drop disable_non_metric_meters option
we don't support large amounts volume=1 meters anymore. the ones that remain are on purpose and should be disabled via pipeline. Change-Id: Ie571555449353f464412e71cd229a66544f9ae45
This commit is contained in:
parent
c0210dd0a2
commit
d82b19e838
@ -130,16 +130,6 @@ class NotificationBase(PluginBase):
|
|||||||
p(list(self.process_notification(notification)))
|
p(list(self.process_notification(notification)))
|
||||||
|
|
||||||
|
|
||||||
class NonMetricNotificationBase(object):
|
|
||||||
"""Use to mark non-measurement meters
|
|
||||||
|
|
||||||
There are a number of historical non-measurement meters that should really
|
|
||||||
be captured as events. This common base allows us to disable these invalid
|
|
||||||
meters.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ExtensionLoadError(Exception):
|
class ExtensionLoadError(Exception):
|
||||||
"""Error of loading pollster plugin.
|
"""Error of loading pollster plugin.
|
||||||
|
|
||||||
|
@ -171,15 +171,12 @@ class ProcessMeterNotifications(plugin_base.NotificationBase):
|
|||||||
pkg_resources.resource_filename(__name__, "data/meters.yaml"))
|
pkg_resources.resource_filename(__name__, "data/meters.yaml"))
|
||||||
|
|
||||||
definitions = {}
|
definitions = {}
|
||||||
disable_non_metric_meters = (self.manager.conf.notification.
|
|
||||||
disable_non_metric_meters)
|
|
||||||
for meter_cfg in reversed(meters_cfg['metric']):
|
for meter_cfg in reversed(meters_cfg['metric']):
|
||||||
if meter_cfg.get('name') in definitions:
|
if meter_cfg.get('name') in definitions:
|
||||||
# skip duplicate meters
|
# skip duplicate meters
|
||||||
LOG.warning(_LW("Skipping duplicate meter definition %s")
|
LOG.warning(_LW("Skipping duplicate meter definition %s")
|
||||||
% meter_cfg)
|
% meter_cfg)
|
||||||
continue
|
continue
|
||||||
if (meter_cfg.get('volume') != 1 or not disable_non_metric_meters):
|
|
||||||
try:
|
try:
|
||||||
md = MeterDefinition(meter_cfg, plugin_manager)
|
md = MeterDefinition(meter_cfg, plugin_manager)
|
||||||
except declarative.DefinitionException as e:
|
except declarative.DefinitionException as e:
|
||||||
|
@ -33,8 +33,7 @@ OPTS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class HTTPRequest(plugin_base.NotificationBase,
|
class HTTPRequest(plugin_base.NotificationBase):
|
||||||
plugin_base.NonMetricNotificationBase):
|
|
||||||
event_types = ['http.request']
|
event_types = ['http.request']
|
||||||
|
|
||||||
def get_targets(self, conf):
|
def get_targets(self, conf):
|
||||||
|
@ -22,10 +22,9 @@ from oslo_log import log
|
|||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
from stevedore import extension
|
from stevedore import extension
|
||||||
|
|
||||||
from ceilometer.agent import plugin_base as base
|
|
||||||
from ceilometer import coordination
|
from ceilometer import coordination
|
||||||
from ceilometer.event import endpoint as event_endpoint
|
from ceilometer.event import endpoint as event_endpoint
|
||||||
from ceilometer.i18n import _, _LI, _LW
|
from ceilometer.i18n import _, _LI
|
||||||
from ceilometer import messaging
|
from ceilometer import messaging
|
||||||
from ceilometer import pipeline
|
from ceilometer import pipeline
|
||||||
from ceilometer import service_base
|
from ceilometer import service_base
|
||||||
@ -47,12 +46,6 @@ OPTS = [
|
|||||||
default=True,
|
default=True,
|
||||||
deprecated_group='collector',
|
deprecated_group='collector',
|
||||||
help='Acknowledge message when event persistence fails.'),
|
help='Acknowledge message when event persistence fails.'),
|
||||||
cfg.BoolOpt('disable_non_metric_meters',
|
|
||||||
default=True,
|
|
||||||
help='WARNING: Ceilometer historically offered the ability to '
|
|
||||||
'store events as meters. This usage is NOT advised as it '
|
|
||||||
'can flood the metering database and cause performance '
|
|
||||||
'degradation.'),
|
|
||||||
cfg.BoolOpt('workload_partitioning',
|
cfg.BoolOpt('workload_partitioning',
|
||||||
default=False,
|
default=False,
|
||||||
help='Enable workload partitioning, allowing multiple '
|
help='Enable workload partitioning, allowing multiple '
|
||||||
@ -214,11 +207,6 @@ class NotificationService(service_base.PipelineBasedService):
|
|||||||
with self.coord_lock:
|
with self.coord_lock:
|
||||||
self._configure_pipeline_listener()
|
self._configure_pipeline_listener()
|
||||||
|
|
||||||
if not self.conf.notification.disable_non_metric_meters:
|
|
||||||
LOG.warning(_LW('Non-metric meters may be collected. It is highly '
|
|
||||||
'advisable to disable these meters using '
|
|
||||||
'ceilometer.conf or the pipeline.yaml'))
|
|
||||||
|
|
||||||
self.init_pipeline_refresh()
|
self.init_pipeline_refresh()
|
||||||
|
|
||||||
def _configure_main_queue_listeners(self, pipe_manager,
|
def _configure_main_queue_listeners(self, pipe_manager,
|
||||||
@ -237,9 +225,6 @@ class NotificationService(service_base.PipelineBasedService):
|
|||||||
targets = []
|
targets = []
|
||||||
for ext in notification_manager:
|
for ext in notification_manager:
|
||||||
handler = ext.obj
|
handler = ext.obj
|
||||||
if (self.conf.notification.disable_non_metric_meters and
|
|
||||||
isinstance(handler, base.NonMetricNotificationBase)):
|
|
||||||
continue
|
|
||||||
LOG.debug('Event types from %(name)s: %(type)s'
|
LOG.debug('Event types from %(name)s: %(type)s'
|
||||||
' (ack_on_error=%(error)s)',
|
' (ack_on_error=%(error)s)',
|
||||||
{'name': ext.name,
|
{'name': ext.name,
|
||||||
|
@ -104,8 +104,6 @@ class TestNotification(tests_base.BaseTestCase):
|
|||||||
self.CONF = self.useFixture(fixture_config.Config(conf)).conf
|
self.CONF = self.useFixture(fixture_config.Config(conf)).conf
|
||||||
self.CONF.set_override("connection", "log://", group='database')
|
self.CONF.set_override("connection", "log://", group='database')
|
||||||
self.CONF.set_override("backend_url", None, group="coordination")
|
self.CONF.set_override("backend_url", None, group="coordination")
|
||||||
self.CONF.set_override("disable_non_metric_meters", False,
|
|
||||||
group="notification")
|
|
||||||
self.CONF.set_override("workload_partitioning", True,
|
self.CONF.set_override("workload_partitioning", True,
|
||||||
group='notification')
|
group='notification')
|
||||||
self.setup_messaging(self.CONF)
|
self.setup_messaging(self.CONF)
|
||||||
@ -534,8 +532,6 @@ class TestRealNotificationMultipleAgents(tests_base.BaseTestCase):
|
|||||||
self.CONF.set_override("event_pipeline_cfg_file",
|
self.CONF.set_override("event_pipeline_cfg_file",
|
||||||
event_pipeline_cfg_file)
|
event_pipeline_cfg_file)
|
||||||
self.CONF.set_override("backend_url", None, group="coordination")
|
self.CONF.set_override("backend_url", None, group="coordination")
|
||||||
self.CONF.set_override("disable_non_metric_meters", False,
|
|
||||||
group="notification")
|
|
||||||
self.CONF.set_override('workload_partitioning', True,
|
self.CONF.set_override('workload_partitioning', True,
|
||||||
group='notification')
|
group='notification')
|
||||||
self.CONF.set_override('pipeline_processing_queues', 2,
|
self.CONF.set_override('pipeline_processing_queues', 2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user