Allow default statsd values
Show the defaults in the debug log if nothing is specified
This commit is contained in:
parent
26a7a2c827
commit
2bb567c24e
@ -49,8 +49,10 @@ class AFSMonCmd(object):
|
|||||||
statsd_args['host'] = os.environ['STATSD_HOST']
|
statsd_args['host'] = os.environ['STATSD_HOST']
|
||||||
if os.getenv('STATSD_PORT', None):
|
if os.getenv('STATSD_PORT', None):
|
||||||
statsd_args['port'] = os.environ['STATSD_PORT']
|
statsd_args['port'] = os.environ['STATSD_PORT']
|
||||||
logger.debug("Sending stats to %s:%s" % (statsd_args['host'],
|
logger.debug("Sending stats to %s:%s" % (
|
||||||
statsd_args['port']))
|
statsd_args.get('host', 'localhost'),
|
||||||
|
statsd_args.get('port', '8125'))
|
||||||
|
)
|
||||||
self.statsd = statsd.StatsClient(**statsd_args)
|
self.statsd = statsd.StatsClient(**statsd_args)
|
||||||
|
|
||||||
# With a lot of volumes, we can flood out a lot of stats
|
# With a lot of volumes, we can flood out a lot of stats
|
||||||
|
Loading…
Reference in New Issue
Block a user