Commit 5a355875 authored by Zuul's avatar Zuul Committed by Gerrit Code Review

Merge "Deprecate aggregated disk.* metrics on instance"

parents a923837c 1e673a64
......@@ -23,6 +23,8 @@ from ceilometer import sample
LOG = log.getLogger(__name__)
AGGREGATED_DEPRECATION_DONE = set()
class AggregateDiskPollster(pollsters.GenericComputePollster):
inspector_method = "inspect_disks"
......@@ -44,6 +46,14 @@ class AggregateDiskPollster(pollsters.GenericComputePollster):
def get_additional_metadata(instance, stats):
return {'device': stats.device}
def get_samples(self, *args, **kwargs):
if self.sample_name not in AGGREGATED_DEPRECATION_DONE:
AGGREGATED_DEPRECATION_DONE.add(self.sample_name)
LOG.warning("The %s metric is deprecated, instead use %s" %
(self.sample_name,
self.sample_name.replace("disk.", "disk.device.")))
return super(AggregateDiskPollster, self).get_samples(*args, **kwargs)
class PerDeviceDiskPollster(pollsters.GenericComputePollster):
inspector_method = "inspect_disks"
......
......@@ -10,10 +10,10 @@ sources:
- network.incoming.packets
- network.outgoing.bytes
- network.outgoing.packets
- disk.read.bytes
- disk.read.requests
- disk.write.bytes
- disk.write.requests
- disk.device.read.bytes
- disk.device.read.requests
- disk.device.write.bytes
- disk.device.write.requests
- hardware.cpu.util
- hardware.memory.used
- hardware.memory.total
......
---
deprecations:
- |
disk.* aggregated metrics for instance are deprecated, in favor of the
per disk metrics (disk.device.*). Now, it's up to the backend to provide
such aggregation feature. Gnocchi already provides this.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment