Created
September 30, 2015 23:23
-
-
Save megahall/676ca0410af4aacc4f74 to your computer and use it in GitHub Desktop.
Riak Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ft=erlang ts=4 sw=4 et | |
[ | |
%% Riak Client APIs config | |
{riak_api, [ | |
%% pb_backlog is the maximum length to which the queue of pending | |
%% connections may grow. If set, it must be an integer >= 0. | |
%% By default the value is 5. If you anticipate a huge number of | |
%% connections being initialised *simultaneously*, set this number | |
%% higher. | |
{pb_backlog, 128}, | |
%% pb is a list of IP addresses and TCP ports that the Riak | |
%% Protocol Buffers interface will bind. | |
{pb, [ {"127.0.0.1", 8087 } ]} | |
]}, | |
%% Riak Core config | |
{riak_core, [ | |
%% Default location of ringstate | |
{ring_state_dir, "/var/lib/riak/ring"}, | |
%% Default ring creation size. Make sure it is a power of 2, | |
%% e.g. 16, 32, 64, 128, 256, 512 etc | |
%{ring_creation_size, 64}, | |
%% http is a list of IP addresses and TCP ports that the Riak | |
%% HTTP interface will bind. | |
{http, [ {"127.0.0.1", 8098 } ]}, | |
%% https is a list of IP addresses and TCP ports that the Riak | |
%% HTTPS interface will bind. | |
%{https, [{ "127.0.0.1", 8098 }]}, | |
%% Default cert and key locations for https can be overridden | |
%% with the ssl config variable, for example: | |
%{ssl, [ | |
% {certfile, "/etc/riak/cert.pem"}, | |
% {keyfile, "/etc/riak/key.pem"} | |
% ]}, | |
%% riak_handoff_port is the TCP port that Riak uses for | |
%% intra-cluster data handoff. | |
{handoff_port, 8099 }, | |
%% To encrypt riak_core intra-cluster data handoff traffic, | |
%% uncomment the following line and edit its path to an | |
%% appropriate certfile and keyfile. (This example uses a | |
%% single file with both items concatenated together.) | |
%{handoff_ssl_options, [{certfile, "/tmp/erlserver.pem"}]}, | |
%% DTrace support | |
%% Do not enable 'dtrace_support' unless your Erlang/OTP | |
%% runtime is compiled to support DTrace. DTrace is | |
%% available in R15B01 (supported by the Erlang/OTP | |
%% official source package) and in R14B04 via a custom | |
%% source repository & branch. | |
{dtrace_support, false}, | |
%% Health Checks | |
%% If disabled, health checks registered by an application will | |
%% be ignored. NOTE: this option cannot be changed at runtime. | |
%% To re-enable, the setting must be changed and the node restarted. | |
%% NOTE: As of Riak 1.3.2, health checks are deprecated as they | |
%% may interfere with the new overload protection mechanisms. | |
%% If there is a good reason to re-enable them, you must uncomment | |
%% this line and also add an entry in the riak_kv section: | |
%% {riak_kv, [ ..., {enable_health_checks, true}, ...]} | |
%% {enable_health_checks, true}, | |
%% Platform-specific installation paths (substituted by rebar) | |
{platform_bin_dir, "/usr/sbin"}, | |
{platform_data_dir, "/var/lib/riak"}, | |
{platform_etc_dir, "/etc/riak"}, | |
{platform_lib_dir, "/usr/lib/riak/lib"}, | |
{platform_log_dir, "/var/log/riak"}, | |
%% Prevents data writes from being chosen arbitrarily by timestamp | |
{default_bucket_props, [{allow_mult, true}]} | |
]}, | |
%% Riak KV config | |
{riak_kv, [ | |
%% Storage_backend specifies the Erlang module defining the storage | |
%% mechanism that will be used on this node. | |
%% {storage_backend, riak_kv_bitcask_backend}, | |
{add_paths, ["/usr/lib/riak-cs/lib/riak_cs-1.4.5/ebin"]}, | |
{storage_backend, riak_cs_kv_multi_backend}, | |
{multi_backend_prefix_list, [{<<"0b:">>, be_blocks}]}, | |
{multi_backend_default, be_default}, | |
{multi_backend, [ | |
{be_default, riak_kv_eleveldb_backend, [ | |
{max_open_files, 50}, | |
{data_root, "/var/lib/riak/leveldb"} | |
]}, | |
{be_blocks, riak_kv_bitcask_backend, [ | |
{data_root, "/var/lib/riak/bitcask"} | |
]} | |
]}, | |
%% raw_name is the first part of all URLS used by the Riak raw HTTP | |
%% interface. See riak_web.erl and raw_http_resource.erl for | |
%% details. | |
%{raw_name, "riak"}, | |
%% Enable active anti-entropy subsystem + optional debug messages: | |
%% {anti_entropy, {on|off, []}}, | |
%% {anti_entropy, {on|off, [debug]}}, | |
{anti_entropy, {on, []}}, | |
%% Restrict how fast AAE can build hash trees. Building the tree | |
%% for a given partition requires a full scan over that partition's | |
%% data. Once built, trees stay built until they are expired. | |
%% Config is of the form: | |
%% {num-builds, per-timespan-in-milliseconds} | |
%% Default is 1 build per hour. | |
{anti_entropy_build_limit, {1, 3600000}}, | |
%% Determine how often hash trees are expired after being built. | |
%% Periodically expiring a hash tree ensures the on-disk hash tree | |
%% data stays consistent with the actual k/v backend data. It also | |
%% helps Riak identify silent disk failures and bit rot. However, | |
%% expiration is not needed for normal AAE operation and should be | |
%% infrequent for performance reasons. The time is specified in | |
%% milliseconds. The default is 1 week. | |
{anti_entropy_expire, 604800000}, | |
%% Limit how many AAE exchanges/builds can happen concurrently. | |
{anti_entropy_concurrency, 2}, | |
%% The tick determines how often the AAE manager looks for work | |
%% to do (building/expiring trees, triggering exchanges, etc). | |
%% The default is every 15 seconds. Lowering this value will | |
%% speedup the rate that all replicas are synced across the cluster. | |
%% Increasing the value is not recommended. | |
{anti_entropy_tick, 15000}, | |
%% The directory where AAE hash trees are stored. | |
{anti_entropy_data_dir, "/var/lib/riak/anti_entropy"}, | |
%% The LevelDB options used by AAE to generate the LevelDB-backed | |
%% on-disk hashtrees. | |
{anti_entropy_leveldb_opts, [{write_buffer_size, 4194304}, | |
{max_open_files, 20}]}, | |
%% mapred_name is URL used to submit map/reduce requests to Riak. | |
{mapred_name, "mapred"}, | |
%% mapred_2i_pipe indicates whether secondary-index | |
%% MapReduce inputs are queued in parallel via their own | |
%% pipe ('true'), or serially via a helper process | |
%% ('false' or undefined). Set to 'false' or leave | |
%% undefined during a rolling upgrade from 1.0. | |
{mapred_2i_pipe, true}, | |
%% Each of the following entries control how many Javascript | |
%% virtual machines are available for executing map, reduce, | |
%% pre- and post-commit hook functions. | |
{map_js_vm_count, 0 }, | |
{reduce_js_vm_count, 0 }, | |
{hook_js_vm_count, 0 }, | |
%% js_max_vm_mem is the maximum amount of memory, in megabytes, | |
%% allocated to the Javascript VMs. If unset, the default is | |
%% 8MB. | |
{js_max_vm_mem, 8}, | |
%% js_thread_stack is the maximum amount of thread stack, in megabyes, | |
%% allocate to the Javascript VMs. If unset, the default is 16MB. | |
%% NOTE: This is not the same as the C thread stack. | |
{js_thread_stack, 16}, | |
%% js_source_dir should point to a directory containing Javascript | |
%% source files which will be loaded by Riak when it initializes | |
%% Javascript VMs. | |
%{js_source_dir, "/tmp/js_source"}, | |
%% http_url_encoding determines how Riak treats URL encoded | |
%% buckets, keys, and links over the REST API. When set to 'on' | |
%% Riak always decodes encoded values sent as URLs and Headers. | |
%% Otherwise, Riak defaults to compatibility mode where links | |
%% are decoded, but buckets and keys are not. The compatibility | |
%% mode will be removed in a future release. | |
{http_url_encoding, on}, | |
%% Switch to vnode-based vclocks rather than client ids. This | |
%% significantly reduces the number of vclock entries. | |
%% Only set true if *all* nodes in the cluster are upgraded to 1.0 | |
{vnode_vclocks, true}, | |
%% This option toggles compatibility of keylisting with 1.0 | |
%% and earlier versions. Once a rolling upgrade to a version | |
%% > 1.0 is completed for a cluster, this should be set to | |
%% true for better control of memory usage during key listing | |
%% operations | |
{listkeys_backpressure, true}, | |
%% This option specifies how many of each type of fsm may exist | |
%% concurrently. This is for overload protection and is a new | |
%% mechanism that obsoletes 1.3's health checks. Note that this number | |
%% represents two potential processes, so +P in vm.args should be at | |
%% least 3X the fsm_limit. | |
{fsm_limit, 50000}, | |
%% Uncomment to make non-paginated results be sorted the | |
%% same way paginated results are: by term, then key. | |
%% In Riak 1.4.* before 1.4.4, all results were sorted this way | |
%% by default, which can adversely affect performance in some cases. | |
%% Setting this to true emulates that behavior. | |
%% {secondary_index_sort_default, true}, | |
%% object_format controls which binary representation of a riak_object | |
%% is stored on disk. | |
%% Current options are: v0, v1. | |
%% v0: Original erlang:term_to_binary format. Higher space overhead. | |
%% v1: New format for more compact storage of small values. | |
{object_format, v1} | |
]}, | |
%% Riak Search Config | |
{riak_search, [ | |
%% To enable Search functionality set this 'true'. | |
{enabled, false} | |
]}, | |
%% Merge Index Config | |
{merge_index, [ | |
%% The root dir to store search merge_index data | |
{data_root, "/var/lib/riak/merge_index"}, | |
%% Size, in bytes, of the in-memory buffer. When this | |
%% threshold has been reached the data is transformed | |
%% into a segment file which resides on disk. | |
{buffer_rollover_size, 1048576}, | |
%% Overtime the segment files need to be compacted. | |
%% This is the maximum number of segments that will be | |
%% compacted at once. A lower value will lead to | |
%% quicker but more frequent compactions. | |
{max_compact_segments, 20} | |
]}, | |
%% Bitcask Config | |
{bitcask, [ | |
%% Configure how Bitcask writes data to disk. | |
%% erlang: Erlang's built-in file API | |
%% nif: Direct calls to the POSIX C API | |
%% | |
%% The NIF mode provides higher throughput for certain | |
%% workloads, but has the potential to negatively impact | |
%% the Erlang VM, leading to higher worst-case latencies | |
%% and possible throughput collapse. | |
{io_mode, erlang}, | |
{data_root, "/var/lib/riak/bitcask"} | |
]}, | |
%% eLevelDB Config | |
{eleveldb, [ | |
{data_root, "/var/lib/riak/leveldb"} | |
]}, | |
%% Lager Config | |
{lager, [ | |
%% What handlers to install with what arguments | |
%% The defaults for the logfiles are to rotate the files when | |
%% they reach 10Mb or at midnight, whichever comes first, and keep | |
%% the last 5 rotations. See the lager README for a description of | |
%% the time rotation format: | |
%% https://github.com/basho/lager/blob/master/README.org | |
%% | |
%% If you wish to disable rotation, you can either set the size to 0 | |
%% and the rotation time to "", or instead specify a 2-tuple that only | |
%% consists of {Logfile, Level}. | |
%% | |
%% If you wish to have riak log messages to syslog, you can use a handler | |
%% like this: | |
%% {lager_syslog_backend, ["riak", daemon, info]}, | |
%% | |
{handlers, [ | |
{lager_file_backend, [ | |
{"/var/log/riak/error.log", error, 10485760, "$D0", 5}, | |
{"/var/log/riak/console.log", info, 10485760, "$D0", 5}, | |
{"/var/log/riak/verbose.log", debug, 10485760, "$D0", 5} | |
]} | |
] }, | |
%% Whether to write a crash log, and where. | |
%% Commented/omitted/undefined means no crash logger. | |
{crash_log, "/var/log/riak/crash.log"}, | |
%% Maximum size in bytes of events in the crash log - defaults to 65536 | |
{crash_log_msg_size, 65536}, | |
%% Maximum size of the crash log in bytes, before its rotated, set | |
%% to 0 to disable rotation - default is 0 | |
{crash_log_size, 10485760}, | |
%% What time to rotate the crash log - default is no time | |
%% rotation. See the lager README for a description of this format: | |
%% https://github.com/basho/lager/blob/master/README.org | |
{crash_log_date, "$D0"}, | |
%% Number of rotated crash logs to keep, 0 means keep only the | |
%% current one - default is 0 | |
{crash_log_count, 5}, | |
%% Whether to redirect error_logger messages into lager - defaults to true | |
{error_logger_redirect, true}, | |
%% maximum number of error_logger messages to handle in a second | |
%% lager 2.0.0 shipped with a limit of 50, which is a little low for riak's startup | |
{error_logger_hwm, 100} | |
]}, | |
%% riak_sysmon config | |
{riak_sysmon, [ | |
%% To disable forwarding events of a particular type, use a | |
%% limit of 0. | |
{process_limit, 30}, | |
{port_limit, 2}, | |
%% Finding reasonable limits for a given workload is a matter | |
%% of experimentation. | |
%% NOTE: Enabling the 'gc_ms_limit' monitor (by setting non-zero) | |
%% can cause performance problems on multi-CPU systems. | |
{gc_ms_limit, 0}, | |
{heap_word_limit, 40111000}, | |
%% Configure the following items to 'false' to disable logging | |
%% of that event type. | |
{busy_port, true}, | |
{busy_dist_port, true} | |
]}, | |
%% SASL config | |
{sasl, [ | |
{sasl_error_logger, false} | |
]}, | |
%% riak_control config | |
{riak_control, [ | |
%% Set to false to disable the admin panel. | |
{enabled, true}, | |
%% Authentication style used for access to the admin | |
%% panel. Valid styles are 'userlist' <TODO>. | |
{auth, none}, | |
%% If auth is set to 'userlist' then this is the | |
%% list of usernames and passwords for access to the | |
%% admin panel. | |
{userlist, [{"user", "pass"} | |
]}, | |
%% The admin panel is broken up into multiple | |
%% components, each of which is enabled or disabled | |
%% by one of these settings. | |
{admin, true} | |
]} | |
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ts=4 sw=4 et | |
[ | |
%% Riak CS configuration | |
{riak_cs, [ | |
%% == Basic Configuration == | |
%% Riak CS http/https port and IP address to listen at | |
%% for object storage activity | |
{cs_ip, "0.0.0.0"}, | |
{cs_port, 8080 } , | |
%% Riak node to which Riak CS accesses | |
{riak_ip, "127.0.0.1"}, | |
{riak_pb_port, 8087 } , | |
%% Configuration for access to request | |
%% serialization service | |
{stanchion_ip, "127.0.0.1"}, | |
{stanchion_port, 8085 }, | |
{stanchion_ssl, false }, | |
%% Enable this to allow the creation of an admin user | |
%% when setting up a system. It is recommended to only | |
%% enable this temporarily unless your use-case | |
%% specifically dictates letting anonymous users to | |
%% create accounts. | |
{anonymous_user_creation, true}, | |
%% Admin user credentials. Admin access like | |
%% /riak-cs/stats requires this entry to be set | |
%% properly. The credentials specified here must match | |
%% the admin credentials specified in the stanchion | |
%% app.config for the system to function properly. | |
{admin_key, "admin-key"}, | |
{admin_secret, "admin-secret"}, | |
%% Port and IP address to listen on for system | |
%% administration tasks. Uncomment the following lines | |
%% to use a separate IP and port for administrative | |
%% API calls. | |
%% {admin_ip, "127.0.0.1"}, | |
%% {admin_port, 8000 } , | |
%% If SSL needed, un-comment. Without SSL | |
%% section, CS will be accessible via http. | |
%% {ssl, [ | |
%% {certfile, "./etc/cert.pem"}, | |
%% {keyfile, "./etc/key.pem"} | |
%% ]}, | |
%% Root host name which Riak CS accepts. | |
%% Your CS bucket at s3.example.com will be accessible | |
%% via URL like http://bucket.s3.example.com/object/name | |
{cs_root_host, "s3.amazonaws.com"}, | |
%% Connection pools | |
%% Each pool is specified as a nested | |
%% tuple of {Name, {FixedSize, OverflowSize}} | |
{connection_pools, | |
[ | |
{request_pool, {128, 0} }, | |
{bucket_list_pool, {5, 0} } | |
]}, | |
%% == API and Authentication == | |
{rewrite_module, riak_cs_s3_rewrite }, | |
{auth_module, riak_cs_s3_auth }, | |
%% == Bucket (List Objects) == | |
%% Set this to true once you've upgraded all of your | |
%% Riak nodes to 1.4.0 or greater. | |
{fold_objects_for_list_keys, true}, | |
%% == n-val 1 GET requests == | |
{n_val_1_get_requests, true}, | |
%% == Rolling upgrade support == | |
%% Riak CS version number. This is used to selectively | |
%% enable new features for the current version to better | |
%% support rolling upgrades. New installs should not | |
%% need to modify this. If peforming a rolling upgrade | |
%% then set this value to 0 until all nodes have been | |
%% upgraded and then set back to the original value. | |
{cs_version, 10300 }, | |
%% == Usage recording == | |
%% How often to flush the access log; integer factor of | |
%% access_archive_period (1 == once per period; 2 == | |
%% twice per period, etc.) | |
{access_log_flush_factor, 1}, | |
%% Additional access log flush trigger - flush after | |
%% this many accesses are recorded, even if the flush | |
%% interval has not expired; integer number of accesses | |
{access_log_flush_size, 1000000}, | |
%% How large each access archive object is. Should be a | |
%% multiple of access_log_flush_interval; integer number | |
%% of seconds (3600 == 1 hour) | |
{access_archive_period, 3600}, | |
%% How many access logs are allowed to pile up in the | |
%% archiver's queue before it starts skipping to catch | |
%% up; integer number of logs | |
{access_archiver_max_backlog, 2}, | |
%% When to automatically start storage calculation | |
%% batches; list of "HHMM" UTC times | |
%% ([] == do not automatically calculation; | |
%% ["0600"] == automatically calculate at 6am UTC every day; | |
%% ["0600","1945"] == automatically calculate at 6am and | |
%% again at 7:45pm every day) | |
{storage_schedule, []}, | |
%% How large each storage archive object is. Should be | |
%% chosen such that each storage_schedule entry falls in | |
%% a different period; integer number of seconds | |
%% (86400 == 1 day) | |
{storage_archive_period, 86400}, | |
%% How many archive periods a user can request in one | |
%% usage read, applied independently to access and | |
%% storage; integer number of intervals (744 == 1 month | |
%% @ 1 hour intervals) | |
{usage_request_limit, 744}, | |
%% == Garbage Collection == | |
%% The number of seconds to retain the block | |
%% for an object after it has been deleted. | |
%% This leeway time is set to give the delete | |
%% indication time to propogate to all replicas. | |
%% 86400 is 24-hours. | |
{leeway_seconds, 86400}, | |
%% How often the garbage collection daemon | |
%% waits in-between gc batches. | |
%% 900 is 15-minutes. | |
{gc_interval, 900}, | |
%% How long a move to the garbage | |
%% collection to do list can remain | |
%% failed, before we retry it. | |
%% 21600 is 6-hours. | |
{gc_retry_interval, 21600}, | |
%% If your load balancer adds 'X-Forwarded-For' header | |
%% and it is reliable (able to gaurantee it is not added | |
%% by malicious user), turn this true. Otherwise, by | |
%% default, Riak CS takes source IP address as an input. | |
{trust_x_forwarded_for, false}, | |
%% == DTrace == | |
%% If your Erlang virtual machine supports DTrace (or | |
%% user-space SystemTap), set dtrace_support to true. | |
{dtrace_support, false} | |
]}, | |
{webmachine, [ | |
%% custom server name at http response header "Server: Riak CS" | |
{server_name, "Riak CS"}, | |
%% The webmachine_log_handler entry can be | |
%% commented-out or removed to disable access | |
%% logging. Do not remove the | |
%% riak_cs_access_log_handler entry. | |
{log_handlers, [ | |
{webmachine_log_handler, ["/var/log/riak-cs"]}, | |
{riak_cs_access_log_handler, []} | |
]} | |
]}, | |
{lager, [ | |
%% What handlers to install with what arguments | |
%% The defaults for the logfiles are to rotate the files when | |
%% they reach 10Mb or at midnight, whichever comes first, and keep | |
%% the last 5 rotations. See the lager README for a description of | |
%% the time rotation format: | |
%% https://github.com/basho/lager/blob/master/README.org | |
%% | |
%% If you wish to disable rotation, you can either set the size to 0 | |
%% and the rotation time to "", or instead specify a 2-tuple that only | |
%% consists of {Logfile, Level}. | |
%% | |
%% To enable logging to syslog, add the following handler: | |
%% | |
%% {lager_syslog_backend, ["riak", local1, info]} | |
{handlers, [ | |
{lager_console_backend, info}, | |
{lager_file_backend, [{file, "/var/log/riak-cs/error.log"}, | |
{level, error}, | |
{size, 10485760}, | |
{date, "$D0"}, | |
{count, 5}]}, | |
{lager_file_backend, [{file, "/var/log/riak-cs/console.log"}, | |
{level, info}, | |
{size, 10485760}, | |
{date, "$D0"}, | |
{count, 5}]}, | |
{lager_file_backend, [{file, "/var/log/riak-cs/verbose.log"}, | |
{level, debug}, | |
{size, 10485760}, | |
{date, "$D0"}, | |
{count, 5}]} | |
]}, | |
%% Whether to write a crash log, and where. | |
%% Commented/omitted/undefined means no crash logger. | |
{crash_log, "/var/log/riak-cs/crash.log"}, | |
%% Maximum size in bytes of events in the crash log - defaults to 65536 | |
{crash_log_msg_size, 65536}, | |
%% Maximum size of the crash log in bytes, before its rotated, set | |
%% to 0 to disable rotation - default is 0 | |
{crash_log_size, 10485760}, | |
%% What time to rotate the crash log - default is no time | |
%% rotation. See the lager README for a description of this format: | |
%% https://github.com/basho/lager/blob/master/README.org | |
{crash_log_date, "$D0"}, | |
%% Number of rotated crash logs to keep, 0 means keep only the | |
%% current one - default is 0 | |
{crash_log_count, 5}, | |
%% Whether to redirect error_logger messages into lager - defaults to true | |
{error_logger_redirect, true} | |
]}, | |
%% SASL config | |
{sasl, [ | |
{sasl_error_logger, false} | |
]} | |
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ts=4 sw=4 et | |
[ | |
%% Riak CS Control | |
{riak_cs_control, [ | |
%% What port to run the application on. | |
{port, 8081 }, | |
%% Instance of Riak CS you wish to talk to. | |
{cs_hostname, "s3.amazonaws.com" }, | |
{cs_port, 80 }, | |
{cs_protocol, "http" }, | |
%% Proxy information; necessary if you are using s3.amazonaws.com as | |
%% your hostname. | |
{cs_proxy_host, "localhost" }, | |
{cs_proxy_port, 8080 }, | |
%% Credentials you want the application to run as. | |
{cs_admin_key, "admin-key" }, | |
{cs_admin_secret, "admin-secret" }, | |
%% Specify the bucket name for administration options. | |
{cs_administration_bucket, "riak-cs" } | |
]}, | |
{lager, [ | |
%% What handlers to install with what arguments | |
%% The defaults for the logfiles are to rotate the files when | |
%% they reach 10Mb or at midnight, whichever comes first, and keep | |
%% the last 5 rotations. See the lager README for a description of | |
%% the time rotation format: | |
%% https://github.com/basho/lager/blob/master/README.org | |
%% | |
%% If you wish to disable rotation, you can either set the size to 0 | |
%% and the rotation time to "", or instead specify a 2-tuple that only | |
%% consists of {Logfile, Level}. | |
{handlers, [ | |
{lager_console_backend, info}, | |
{lager_file_backend, [ | |
{"/var/log/riak-cs-control/error.log", error, 10485760, "$D0", 5}, | |
{"/var/log/riak-cs-control/console.log", info, 10485760, "$D0", 5}, | |
{"/var/log/riak-cs-control/verbose.log", debug, 10485760, "$D0", 5} | |
]} | |
]}, | |
%% Whether to write a crash log, and where. | |
%% Commented/omitted/undefined means no crash logger. | |
{crash_log, "/var/log/riak-cs-control/crash.log"}, | |
%% Maximum size in bytes of events in the crash log - defaults to 65536 | |
{crash_log_msg_size, 65536}, | |
%% Maximum size of the crash log in bytes, before its rotated, set | |
%% to 0 to disable rotation - default is 0 | |
{crash_log_size, 10485760}, | |
%% What time to rotate the crash log - default is no time | |
%% rotation. See the lager README for a description of this format: | |
%% https://github.com/basho/lager/blob/master/README.org | |
{crash_log_date, "$D0"}, | |
%% Number of rotated crash logs to keep, 0 means keep only the | |
%% current one - default is 0 | |
{crash_log_count, 5}, | |
%% Whether to redirect error_logger messages into lager - defaults to true | |
{error_logger_redirect, true} | |
]}, | |
%% SASL config | |
{sasl, [ | |
{sasl_error_logger, false} | |
]} | |
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ts=4 sw=4 et | |
[ | |
%% Stanchion config | |
{stanchion, [ | |
{stanchion_ip, "127.0.0.1"}, | |
{stanchion_port, 8085 } , | |
%%{ssl, [ | |
%% {certfile, "./etc/cert.pem"}, | |
%% {keyfile, "./etc/key.pem"} | |
%% ]}, | |
{auth_bypass, false } , | |
%% Riak connection details | |
{riak_ip, "127.0.0.1"}, | |
{riak_pb_port, 8087 }, | |
%% Admin user credentials | |
{admin_key, "admin-key"}, | |
{admin_secret, "admin-secret"} | |
]}, | |
{lager, [ | |
%% What handlers to install with what arguments | |
%% The defaults for the logfiles are to rotate the files when | |
%% they reach 10Mb or at midnight, whichever comes first, and keep | |
%% the last 5 rotations. See the lager README for a description of | |
%% the time rotation format: | |
%% https://github.com/basho/lager/blob/master/README.org | |
%% | |
%% If you wish to disable rotation, you can either set the size to 0 | |
%% and the rotation time to "", or instead specify a 2-tuple that only | |
%% consists of {Logfile, Level}. | |
%% | |
%% To enable logging to syslog, add the following handler: | |
%% | |
%% {lager_syslog_backend, ["stanchion", local1, info]} | |
{handlers, [ | |
{lager_console_backend, info}, | |
{lager_file_backend, [{file, "/var/log/stanchion/error.log"}, | |
{level, error}, | |
{size, 10485760}, | |
{date, "$D0"}, | |
{count, 5}]}, | |
{lager_file_backend, [{file, "/var/log/stanchion/console.log"}, | |
{level, info}, | |
{size, 10485760}, | |
{date, "$D0"}, | |
{count, 5}]}, | |
{lager_file_backend, [{file, "/var/log/stanchion/verbose.log"}, | |
{level, debug}, | |
{size, 10485760}, | |
{date, "$D0"}, | |
{count, 5}]} | |
]}, | |
%% Whether to write a crash log, and where. | |
%% Commented/omitted/undefined means no crash logger. | |
{crash_log, "/var/log/stanchion/crash.log"}, | |
%% Maximum size in bytes of events in the crash log - defaults to 65536 | |
{crash_log_msg_size, 65536}, | |
%% Maximum size of the crash log in bytes, before its rotated, set | |
%% to 0 to disable rotation - default is 0 | |
{crash_log_size, 10485760}, | |
%% What time to rotate the crash log - default is no time | |
%% rotation. See the lager README for a description of this format: | |
%% https://github.com/basho/lager/blob/master/README.org | |
{crash_log_date, "$D0"}, | |
%% Number of rotated crash logs to keep, 0 means keep only the | |
%% current one - default is 0 | |
{crash_log_count, 5}, | |
%% Whether to redirect error_logger messages into lager - defaults to true | |
{error_logger_redirect, true} | |
]}, | |
%% SASL config | |
{sasl, [ | |
{sasl_error_logger, false} | |
]} | |
]. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment