4a2ae2b460
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
110 lines
3.1 KiB
Plaintext
110 lines
3.1 KiB
Plaintext
[DEFAULT]
|
|
# bind_ip = 0.0.0.0
|
|
# bind_port = 6000
|
|
# backlog = 4096
|
|
# workers = 1
|
|
# user = swift
|
|
# swift_dir = /etc/swift
|
|
# devices = /srv/node
|
|
# mount_check = true
|
|
# disable_fallocate = false
|
|
# expiring_objects_container_divisor = 86400
|
|
# You can specify default log routing here if you want:
|
|
# log_name = swift
|
|
# log_facility = LOG_LOCAL0
|
|
# log_level = INFO
|
|
# log_address = /dev/log
|
|
# If set, log_udp_host will override log_address
|
|
# log_udp_host =
|
|
# log_udp_port = 514
|
|
# You can enable StatsD logging here:
|
|
# log_statsd_host = localhost
|
|
# log_statsd_port = 8125
|
|
# log_statsd_default_sample_rate = 1
|
|
# log_statsd_metric_prefix =
|
|
|
|
[pipeline:main]
|
|
pipeline = recon object-server
|
|
|
|
[app:object-server]
|
|
use = egg:swift#object
|
|
# 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
|
|
# set log_address = /dev/log
|
|
# node_timeout = 3
|
|
# conn_timeout = 0.5
|
|
# network_chunk_size = 65536
|
|
# disk_chunk_size = 65536
|
|
# max_upload_time = 86400
|
|
# slow = 0
|
|
# Objects smaller than this are not evicted from the buffercache once read
|
|
# keep_cache_size = 5424880
|
|
# If true, objects for authenticated GET requests may be kept in buffer cache
|
|
# if small enough
|
|
# keep_cache_private = False
|
|
# 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
|
|
# auto_create_account_prefix = .
|
|
|
|
[filter:recon]
|
|
use = egg:swift#recon
|
|
#recon_cache_path = /var/cache/swift
|
|
#recon_lock_path = /var/lock
|
|
|
|
[object-replicator]
|
|
# You can override the default log routing for this app here (don't use set!):
|
|
# log_name = object-replicator
|
|
# log_facility = LOG_LOCAL0
|
|
# log_level = INFO
|
|
# log_address = /dev/log
|
|
# vm_test_mode = no
|
|
# daemonize = on
|
|
# run_pause = 30
|
|
# concurrency = 1
|
|
# stats_interval = 300
|
|
# max duration of a partition rsync
|
|
# rsync_timeout = 900
|
|
# passed to rsync for io op timeout
|
|
# rsync_io_timeout = 30
|
|
# max duration of an http request
|
|
# http_timeout = 60
|
|
# attempts to kill all workers if nothing replicates for lockup_timeout seconds
|
|
# lockup_timeout = 1800
|
|
# The replicator also performs reclamation
|
|
# reclaim_age = 604800
|
|
# ring_check_interval = 15
|
|
# recon_cache_path = /var/cache/swift
|
|
|
|
[object-updater]
|
|
# You can override the default log routing for this app here (don't use set!):
|
|
# log_name = object-updater
|
|
# log_facility = LOG_LOCAL0
|
|
# log_level = INFO
|
|
# log_address = /dev/log
|
|
# interval = 300
|
|
# concurrency = 1
|
|
# node_timeout = 10
|
|
# conn_timeout = 0.5
|
|
# slowdown will sleep that amount between objects
|
|
# slowdown = 0.01
|
|
# recon_cache_path = /var/cache/swift
|
|
|
|
[object-auditor]
|
|
# You can override the default log routing for this app here (don't use set!):
|
|
# log_name = object-auditor
|
|
# log_facility = LOG_LOCAL0
|
|
# log_level = INFO
|
|
# log_address = /dev/log
|
|
# files_per_second = 20
|
|
# bytes_per_second = 10000000
|
|
# log_time = 3600
|
|
# zero_byte_files_per_second = 50
|
|
# recon_cache_path = /var/cache/swift
|