Deprecate aggregated disk.* metrics on instance
disk.* are just aggregates of disk.device.*. We basically build the same think twice. It's up to the backend (ie: Gnocchi) to aggregate them if someone want the aggregate. Change-Id: I612b575004f65665f8630f19f56c2fb3637448fd
This commit is contained in:
parent
1a152e1498
commit
1e673a64b9
@ -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
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
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.
|
Loading…
Reference in New Issue
Block a user