Merge "supporting disabling reporting process"

This commit is contained in:
Jenkins 2017-02-01 00:58:29 +00:00 committed by Gerrit Code Review
commit c7c1f64981
2 changed files with 5 additions and 2 deletions

View File

@ -298,7 +298,8 @@ class MetricdServiceManager(cotyledon.ServiceManager):
self.metric_processor_id = self.add(
MetricProcessor, args=(self.conf, self.queue),
workers=conf.metricd.workers)
self.add(MetricReporting, args=(self.conf,))
if self.conf.metricd.metric_reporting_delay >= 0:
self.add(MetricReporting, args=(self.conf,))
self.add(MetricJanitor, args=(self.conf,))
self.register_hooks(on_reload=self.on_reload)

View File

@ -73,9 +73,11 @@ def list_opts():
cfg.IntOpt('metric_reporting_delay',
deprecated_group='storage',
default=120,
min=-1,
required=True,
help="How many seconds to wait between "
"metric ingestion reporting"),
"metric ingestion reporting. Set value to -1 to "
"disable reporting"),
cfg.IntOpt('metric_cleanup_delay',
deprecated_group='storage',
default=300,