2011-10-26 21:42:24 +00:00
|
|
|
[DEFAULT]
|
|
|
|
# swift_dir = /etc/swift
|
|
|
|
# user = swift
|
|
|
|
# You can specify default log routing here if you want:
|
|
|
|
# log_name = swift
|
|
|
|
# log_facility = LOG_LOCAL0
|
|
|
|
# log_level = INFO
|
2012-05-17 15:46:38 -07:00
|
|
|
# log_address = /dev/log
|
2014-05-22 19:37:53 +00:00
|
|
|
# The following caps the length of log lines to the value given; no limit if
|
|
|
|
# set to 0, the default.
|
|
|
|
# log_max_line_length = 0
|
2013-06-06 15:35:19 -07:00
|
|
|
#
|
2012-10-05 15:56:34 -05:00
|
|
|
# comma separated list of functions to call to setup custom log handlers.
|
|
|
|
# functions get passed: conf, name, log_to_console, log_route, fmt, logger,
|
|
|
|
# adapted_logger
|
|
|
|
# log_custom_handlers =
|
2013-06-06 15:35:19 -07:00
|
|
|
#
|
Upating proxy-server StatsD logging.
Removed many StatsD logging calls in proxy-server and added
swift-informant-style catch-all logging in the proxy-logger middleware.
Many errors previously rolled into the "proxy-server.<type>.errors"
counter will now appear broken down by response code and with timing
data at: "proxy-server.<type>.<verb>.<status>.timing". Also, bytes
transferred (sum of in + out) will be at:
"proxy-server.<type>.<verb>.<status>.xfer". The proxy-logging
middleware can get its StatsD config from standard vars in [DEFAULT] or
from access_log_statsd_* config vars in its config section.
Similarly to Swift Informant, request methods ("verbs") are filtered
using the new proxy-logging config var, "log_statsd_valid_http_methods"
which defaults to GET, HEAD, POST, PUT, DELETE, and COPY. Requests with
methods not in this list use "BAD_METHOD" for <verb> in the metric name.
To avoid user error, access_log_statsd_valid_http_methods is also
accepted.
Previously, proxy-server metrics used "Account", "Container", and
"Object" for the <type>, but these are now all lowercase.
Updated the admin guide's StatsD docs to reflect the above changes and
also include the "proxy-server.<type>.handoff_count" and
"proxy-server.<type>.handoff_all_count" metrics.
The proxy server now saves off the original req.method and proxy_logging
will use this if it can (both for request logging and as the "<verb>" in
the statsd timing metric). This fixes bug 1025433.
Removed some stale access_log_* related code in proxy/server.py. Also
removed the BaseApplication/Application distinction as it's no longer
necessary.
Fixed up the sample config files a bit (logging lines, mostly).
Fixed typo in SAIO development guide.
Got proxy_logging.py test coverage to 100%.
Fixed proxy_logging.py for PEP8 v1.3.2.
Enhanced test.unit.FakeLogger to track more calls to enable testing
StatsD metric calls.
Change-Id: I45d94cb76450be96d66fcfab56359bdfdc3a2576
2012-08-19 17:44:43 -07:00
|
|
|
# If set, log_udp_host will override log_address
|
|
|
|
# log_udp_host =
|
|
|
|
# log_udp_port = 514
|
2013-06-06 15:35:19 -07:00
|
|
|
#
|
Upating proxy-server StatsD logging.
Removed many StatsD logging calls in proxy-server and added
swift-informant-style catch-all logging in the proxy-logger middleware.
Many errors previously rolled into the "proxy-server.<type>.errors"
counter will now appear broken down by response code and with timing
data at: "proxy-server.<type>.<verb>.<status>.timing". Also, bytes
transferred (sum of in + out) will be at:
"proxy-server.<type>.<verb>.<status>.xfer". The proxy-logging
middleware can get its StatsD config from standard vars in [DEFAULT] or
from access_log_statsd_* config vars in its config section.
Similarly to Swift Informant, request methods ("verbs") are filtered
using the new proxy-logging config var, "log_statsd_valid_http_methods"
which defaults to GET, HEAD, POST, PUT, DELETE, and COPY. Requests with
methods not in this list use "BAD_METHOD" for <verb> in the metric name.
To avoid user error, access_log_statsd_valid_http_methods is also
accepted.
Previously, proxy-server metrics used "Account", "Container", and
"Object" for the <type>, but these are now all lowercase.
Updated the admin guide's StatsD docs to reflect the above changes and
also include the "proxy-server.<type>.handoff_count" and
"proxy-server.<type>.handoff_all_count" metrics.
The proxy server now saves off the original req.method and proxy_logging
will use this if it can (both for request logging and as the "<verb>" in
the statsd timing metric). This fixes bug 1025433.
Removed some stale access_log_* related code in proxy/server.py. Also
removed the BaseApplication/Application distinction as it's no longer
necessary.
Fixed up the sample config files a bit (logging lines, mostly).
Fixed typo in SAIO development guide.
Got proxy_logging.py test coverage to 100%.
Fixed proxy_logging.py for PEP8 v1.3.2.
Enhanced test.unit.FakeLogger to track more calls to enable testing
StatsD metric calls.
Change-Id: I45d94cb76450be96d66fcfab56359bdfdc3a2576
2012-08-19 17:44:43 -07:00
|
|
|
# You can enable StatsD logging here:
|
2016-02-10 10:36:59 -06:00
|
|
|
# log_statsd_host =
|
Adding StatsD logging to Swift.
Documentation, including a list of metrics reported and their semantics,
is in the Admin Guide in a new section, "Reporting Metrics to StatsD".
An optional "metric prefix" may be configured which will be prepended to
every metric name sent to StatsD.
Here is the rationale for doing a deep integration like this versus only
sending metrics to StatsD in middleware. It's the only way to report
some internal activities of Swift in a real-time manner. So to have one
way of reporting to StatsD and one place/style of configuration, even
some things (like, say, timing of PUT requests into the proxy-server)
which could be logged via middleware are consistently logged the same
way (deep integration via the logger delegate methods).
When log_statsd_host is configured, get_logger() injects a
swift.common.utils.StatsdClient object into the logger as
logger.statsd_client. Then a set of delegate methods on LogAdapter
either pass through to the StatsdClient object or become no-ops. This
allows StatsD logging to look like:
self.logger.increment('some.metric.here')
and do the right thing in all cases and with no messy conditional logic.
I wanted to use the pystatsd module for the StatsD client, but the
version on PyPi is lagging the git repo (and is missing both the prefix
functionality and timing_since() method). So I wrote my
swift.common.utils.StatsdClient. The interface is the same as
pystatsd.Client, but the code was written from scratch. It's pretty
simple, and the tests I added cover it. This also frees Swift from an
optional dependency on the pystatsd module, making this feature easier
to enable.
There's test coverage for the new code and all existing tests continue
to pass.
Refactored out _one_audit_pass() method in swift/account/auditor.py and
swift/container/auditor.py.
Fixed some misc. PEP8 violations.
Misc test cleanups and refactorings (particularly the way "fake logging"
is handled).
Change-Id: Ie968a9ae8771f59ee7591e2ae11999c44bfe33b2
2012-04-01 16:47:08 -07:00
|
|
|
# log_statsd_port = 8125
|
2013-01-19 15:25:27 -08:00
|
|
|
# log_statsd_default_sample_rate = 1.0
|
|
|
|
# log_statsd_sample_rate_factor = 1.0
|
Adding StatsD logging to Swift.
Documentation, including a list of metrics reported and their semantics,
is in the Admin Guide in a new section, "Reporting Metrics to StatsD".
An optional "metric prefix" may be configured which will be prepended to
every metric name sent to StatsD.
Here is the rationale for doing a deep integration like this versus only
sending metrics to StatsD in middleware. It's the only way to report
some internal activities of Swift in a real-time manner. So to have one
way of reporting to StatsD and one place/style of configuration, even
some things (like, say, timing of PUT requests into the proxy-server)
which could be logged via middleware are consistently logged the same
way (deep integration via the logger delegate methods).
When log_statsd_host is configured, get_logger() injects a
swift.common.utils.StatsdClient object into the logger as
logger.statsd_client. Then a set of delegate methods on LogAdapter
either pass through to the StatsdClient object or become no-ops. This
allows StatsD logging to look like:
self.logger.increment('some.metric.here')
and do the right thing in all cases and with no messy conditional logic.
I wanted to use the pystatsd module for the StatsD client, but the
version on PyPi is lagging the git repo (and is missing both the prefix
functionality and timing_since() method). So I wrote my
swift.common.utils.StatsdClient. The interface is the same as
pystatsd.Client, but the code was written from scratch. It's pretty
simple, and the tests I added cover it. This also frees Swift from an
optional dependency on the pystatsd module, making this feature easier
to enable.
There's test coverage for the new code and all existing tests continue
to pass.
Refactored out _one_audit_pass() method in swift/account/auditor.py and
swift/container/auditor.py.
Fixed some misc. PEP8 violations.
Misc test cleanups and refactorings (particularly the way "fake logging"
is handled).
Change-Id: Ie968a9ae8771f59ee7591e2ae11999c44bfe33b2
2012-04-01 16:47:08 -07:00
|
|
|
# log_statsd_metric_prefix =
|
2015-10-22 10:19:49 +02:00
|
|
|
#
|
|
|
|
# You can set scheduling priority of processes. Niceness values range from -20
|
|
|
|
# (most favorable to the process) to 19 (least favorable to the process).
|
|
|
|
# nice_priority =
|
2016-08-18 16:14:36 +02:00
|
|
|
#
|
2015-10-22 10:19:49 +02:00
|
|
|
# You can set I/O scheduling class and priority of processes. I/O niceness
|
|
|
|
# class values are realtime, best-effort and idle. I/O niceness
|
|
|
|
# priority is a number which goes from 0 to 7. The higher the value, the lower
|
|
|
|
# the I/O priority of the process. Work only with ionice_class.
|
|
|
|
# ionice_class =
|
|
|
|
# ionice_priority =
|
2011-10-26 21:42:24 +00:00
|
|
|
|
|
|
|
[object-expirer]
|
2021-05-05 15:30:21 -07:00
|
|
|
# interval = 300.0
|
2014-02-04 16:31:47 +05:30
|
|
|
# expiring_objects_account_name = expiring_objects
|
2021-05-05 15:30:21 -07:00
|
|
|
# report_interval = 300.0
|
2018-01-15 15:16:08 +00:00
|
|
|
#
|
|
|
|
# request_tries is the number of times the expirer's internal client will
|
|
|
|
# attempt any given request in the event of failure. The default is 3.
|
|
|
|
# request_tries = 3
|
|
|
|
|
|
|
|
# concurrency is the level of concurrency to use to do the work, this value
|
2013-05-01 21:11:25 +00:00
|
|
|
# must be set to at least 1
|
|
|
|
# concurrency = 1
|
2018-01-15 15:16:08 +00:00
|
|
|
#
|
2020-10-02 17:16:09 -05:00
|
|
|
# deletes can be ratelimited to prevent the expirer from overwhelming the cluster
|
|
|
|
# tasks_per_second = 50.0
|
|
|
|
#
|
2013-05-01 21:11:25 +00:00
|
|
|
# processes is how many parts to divide the work into, one part per process
|
2018-01-15 15:16:08 +00:00
|
|
|
# that will be doing the work
|
2013-05-01 21:11:25 +00:00
|
|
|
# processes set 0 means that a single process will be doing all the work
|
|
|
|
# processes can also be specified on the command line and will override the
|
2018-01-15 15:16:08 +00:00
|
|
|
# config value
|
2013-05-01 21:11:25 +00:00
|
|
|
# processes = 0
|
2018-01-15 15:16:08 +00:00
|
|
|
#
|
2013-05-01 21:11:25 +00:00
|
|
|
# process is which of the parts a particular process will work on
|
2015-08-07 22:07:01 +08:00
|
|
|
# process can also be specified on the command line and will override the config
|
2018-01-15 15:16:08 +00:00
|
|
|
# value
|
2013-05-01 21:11:25 +00:00
|
|
|
# process is "zero based", if you want to use 3 processes, you should run
|
2018-01-15 15:16:08 +00:00
|
|
|
# processes with process set to 0, 1, and 2
|
2013-05-01 21:11:25 +00:00
|
|
|
# process = 0
|
2018-01-15 15:16:08 +00:00
|
|
|
#
|
2014-06-06 11:35:34 -07:00
|
|
|
# The expirer will re-attempt expiring if the source object is not available
|
|
|
|
# up to reclaim_age seconds before it gives up and deletes the entry in the
|
|
|
|
# queue.
|
|
|
|
# reclaim_age = 604800
|
2018-01-15 15:16:08 +00:00
|
|
|
#
|
2014-07-04 15:56:45 +10:00
|
|
|
# recon_cache_path = /var/cache/swift
|
2015-10-22 10:19:49 +02:00
|
|
|
#
|
|
|
|
# You can set scheduling priority of processes. Niceness values range from -20
|
|
|
|
# (most favorable to the process) to 19 (least favorable to the process).
|
|
|
|
# nice_priority =
|
2016-08-18 16:14:36 +02:00
|
|
|
#
|
2015-10-22 10:19:49 +02:00
|
|
|
# You can set I/O scheduling class and priority of processes. I/O niceness
|
|
|
|
# class values are realtime, best-effort and idle. I/O niceness
|
|
|
|
# priority is a number which goes from 0 to 7. The higher the value, the lower
|
|
|
|
# the I/O priority of the process. Work only with ionice_class.
|
|
|
|
# ionice_class =
|
|
|
|
# ionice_priority =
|
2011-10-26 21:42:24 +00:00
|
|
|
|
2018-01-15 15:16:08 +00:00
|
|
|
#
|
|
|
|
# The following sections define the configuration of the expirer's internal
|
|
|
|
# client pipeline
|
|
|
|
#
|
|
|
|
|
2011-10-26 21:42:24 +00:00
|
|
|
[pipeline:main]
|
2014-07-31 12:18:47 -07:00
|
|
|
pipeline = catch_errors proxy-logging cache proxy-server
|
2011-10-26 21:42:24 +00:00
|
|
|
|
|
|
|
[app:proxy-server]
|
|
|
|
use = egg:swift#proxy
|
|
|
|
# See proxy-server.conf-sample for options
|
|
|
|
|
|
|
|
[filter:cache]
|
|
|
|
use = egg:swift#memcache
|
|
|
|
# See proxy-server.conf-sample for options
|
|
|
|
|
|
|
|
[filter:catch_errors]
|
|
|
|
use = egg:swift#catch_errors
|
|
|
|
# See proxy-server.conf-sample for options
|
2014-07-31 12:18:47 -07:00
|
|
|
|
|
|
|
[filter:proxy-logging]
|
|
|
|
use = egg:swift#proxy_logging
|
|
|
|
# If not set, logging directives from [DEFAULT] without "access_" will be used
|
|
|
|
# access_log_name = swift
|
|
|
|
# access_log_facility = LOG_LOCAL0
|
|
|
|
# access_log_level = INFO
|
|
|
|
# access_log_address = /dev/log
|
|
|
|
#
|
|
|
|
# If set, access_log_udp_host will override access_log_address
|
|
|
|
# access_log_udp_host =
|
|
|
|
# access_log_udp_port = 514
|
|
|
|
#
|
|
|
|
# You can use log_statsd_* from [DEFAULT] or override them here:
|
2016-02-10 10:36:59 -06:00
|
|
|
# access_log_statsd_host =
|
2014-07-31 12:18:47 -07:00
|
|
|
# access_log_statsd_port = 8125
|
|
|
|
# access_log_statsd_default_sample_rate = 1.0
|
|
|
|
# access_log_statsd_sample_rate_factor = 1.0
|
|
|
|
# access_log_statsd_metric_prefix =
|
|
|
|
# access_log_headers = false
|
|
|
|
#
|
|
|
|
# If access_log_headers is True and access_log_headers_only is set only
|
|
|
|
# these headers are logged. Multiple headers can be defined as comma separated
|
|
|
|
# list like this: access_log_headers_only = Host, X-Object-Meta-Mtime
|
|
|
|
# access_log_headers_only =
|
|
|
|
#
|
|
|
|
# By default, the X-Auth-Token is logged. To obscure the value,
|
|
|
|
# set reveal_sensitive_prefix to the number of characters to log.
|
|
|
|
# For example, if set to 12, only the first 12 characters of the
|
|
|
|
# token appear in the log. An unauthorized access of the log file
|
|
|
|
# won't allow unauthorized usage of the token. However, the first
|
|
|
|
# 12 or so characters is unique enough that you can trace/debug
|
|
|
|
# token usage. Set to 0 to suppress the token completely (replaced
|
|
|
|
# by '...' in the log).
|
|
|
|
# Note: reveal_sensitive_prefix will not affect the value
|
|
|
|
# logged with access_log_headers=True.
|
|
|
|
# reveal_sensitive_prefix = 16
|
|
|
|
#
|
|
|
|
# What HTTP methods are allowed for StatsD logging (comma-sep); request methods
|
|
|
|
# not in this list will have "BAD_METHOD" for the <verb> portion of the metric.
|
|
|
|
# log_statsd_valid_http_methods = GET,HEAD,POST,PUT,DELETE,COPY,OPTIONS
|