supporting disabling reporting process

the report generation process may require significant resources
(especially for ceph). it is only required for logging so support
disabling it.

Change-Id: I81b60eed651b75e6d1c021a837aa3be980015ed4
This commit is contained in:
gord chung 2017-01-28 17:45:22 -05:00
parent 65832dd2ea
commit 7dd8a326d5
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

@ -72,9 +72,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,