Files
95786e577c328778de9a734bcd664dd7a7daf46b
swift /etc /object-server.conf-sample

102 lines
2.9 KiB
Plaintext
Raw Normal View History

2010年08月20日 00:42:38 +00:00
[DEFAULT]
2010年07月12日 17:03:45 -05:00
# bind_ip = 0.0.0.0
# bind_port = 6000
2010年07月12日 17:03:45 -05:00
# workers = 1
# user = swift
2010年08月20日 00:42:38 +00:00
# swift_dir = /etc/swift
# devices = /srv/node
# mount_check = true
2011年01月23日 13:18:28 -08:00
# You can specify default log routing here if you want:
# log_name = swift
# log_facility = LOG_LOCAL0
# log_level = INFO
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
# You can enable default statsD logging here and/or override it in sections
# below:
# log_statsd_host = localhost
# log_statsd_port = 8125
# log_statsd_default_sample_rate = 1
# log_statsd_metric_prefix =
2010年08月20日 00:42:38 +00:00
[pipeline:main]
pipeline = recon object-server
2010年08月20日 00:42:38 +00:00
[app:object-server]
use = egg:swift#object
2011年01月23日 13:18:28 -08:00
# You can override the default log routing for this app here:
# set log_name = object-server
# set log_facility = LOG_LOCAL0
# set log_level = INFO
# set log_requests = True
2010年07月12日 17:03:45 -05:00
# node_timeout = 3
# conn_timeout = 0.5
2010年08月20日 00:42:38 +00:00
# network_chunk_size = 65536
# disk_chunk_size = 65536
2010年07月12日 17:03:45 -05:00
# max_upload_time = 86400
# keep_cache_size = 5424880
# If true, objects for authenticated GET requests may be kept in buffer cache
# if small enough
# keep_cache_private = False
2010年10月13日 21:29:58 +00:00
# on PUTs, sync data every n MB
# mb_per_sync = 512
# Comma separated list of headers that can be set in metadata on an object.
# This list is in addition to X-Object-Meta-* headers and cannot include
# Content-Type, etag, Content-Length, or deleted
# allowed_headers = Content-Disposition, Content-Encoding, X-Delete-At, X-Object-Manifest
2010年07月12日 17:03:45 -05:00
use = egg:swift#recon
#recon_lock_path = /var/lock
2010年07月12日 17:03:45 -05:00
[object-replicator]
2011年01月23日 13:18:28 -08:00
# You can override the default log routing for this app here (don't use set!):
# log_name = object-replicator
2011年01月23日 13:18:28 -08:00
# log_facility = LOG_LOCAL0
# log_level = INFO
2010年08月24日 14:10:36 +00:00
# vm_test_mode = no
2010年07月12日 17:03:45 -05:00
# daemonize = on
# run_pause = 30
# concurrency = 1
2010年10月19日 01:05:54 +00:00
# stats_interval = 300
# max duration of a partition rsync
# rsync_timeout = 900
2010年10月19日 01:05:54 +00:00
# passed to rsync for io op timeout
# rsync_io_timeout = 30
2010年10月19日 01:05:54 +00:00
# max duration of an http request
# http_timeout = 60
# attempts to kill all workers if nothing replicates for lockup_timeout seconds
# lockup_timeout = 1800
2010年07月12日 17:03:45 -05:00
# The replicator also performs reclamation
# reclaim_age = 604800
2010年07月12日 17:03:45 -05:00
[object-updater]
2011年01月23日 13:18:28 -08:00
# You can override the default log routing for this app here (don't use set!):
# log_name = object-updater
2011年01月23日 13:18:28 -08:00
# log_facility = LOG_LOCAL0
# log_level = INFO
2010年07月12日 17:03:45 -05:00
# interval = 300
# concurrency = 1
# node_timeout = 10
# conn_timeout = 0.5
# slowdown will sleep that amount between objects
# slowdown = 0.01
2010年07月12日 17:03:45 -05:00
[object-auditor]
2011年01月23日 13:18:28 -08:00
# You can override the default log routing for this app here (don't use set!):
# log_name = object-auditor
2011年01月23日 13:18:28 -08:00
# log_facility = LOG_LOCAL0
# log_level = INFO
2010年12月28日 14:54:00 -08:00
# files_per_second = 20
# bytes_per_second = 10000000
# log_time = 3600
2011年02月21日 16:37:12 -08:00
# zero_byte_files_per_second = 50