diff --git a/ceilometer/tests/test_decoupled_pipeline.py b/ceilometer/tests/test_decoupled_pipeline.py index 02e44e89..4b7ac762 100644 --- a/ceilometer/tests/test_decoupled_pipeline.py +++ b/ceilometer/tests/test_decoupled_pipeline.py @@ -240,6 +240,20 @@ class TestDecoupledPipeline(pipeline_base.BasePipelineTestCase): meters, units) + def test_rate_of_change_boilerplate_per_disk_device_read_cfg(self): + meters = ('disk.device.read.bytes', 'disk.device.read.requests') + units = ('B', 'request') + self._do_test_rate_of_change_in_boilerplate_pipeline_cfg(2, + meters, + units) + + def test_rate_of_change_boilerplate_per_disk_device_write_cfg(self): + meters = ('disk.device.write.bytes', 'disk.device.write.requests') + units = ('B', 'request') + self._do_test_rate_of_change_in_boilerplate_pipeline_cfg(2, + meters, + units) + def test_rate_of_change_boilerplate_network_outgoing_cfg(self): meters = ('network.outgoing.bytes', 'network.outgoing.packets') units = ('B', 'packet') diff --git a/ceilometer/tests/test_deprecated_pipeline.py b/ceilometer/tests/test_deprecated_pipeline.py index 7930e3ed..3f4d093e 100644 --- a/ceilometer/tests/test_deprecated_pipeline.py +++ b/ceilometer/tests/test_deprecated_pipeline.py @@ -99,6 +99,20 @@ class TestDeprecatedPipeline(pipeline_base.BasePipelineTestCase): meters, units) + def test_rate_of_change_boilerplate_per_disk_device_read_cfg(self): + meters = ('disk.device.read.bytes', 'disk.device.read.requests') + units = ('B', 'request') + self._do_test_rate_of_change_in_boilerplate_pipeline_cfg(2, + meters, + units) + + def test_rate_of_change_boilerplate_per_disk_device_write_cfg(self): + meters = ('disk.device.write.bytes', 'disk.device.write.requests') + units = ('B', 'request') + self._do_test_rate_of_change_in_boilerplate_pipeline_cfg(2, + meters, + units) + def test_rate_of_change_boilerplate_network_incoming_cfg(self): meters = ('network.incoming.bytes', 'network.incoming.packets') units = ('B', 'packet') diff --git a/etc/ceilometer/deprecated_pipeline.yaml b/etc/ceilometer/deprecated_pipeline.yaml index b34f5ab5..6e4597fc 100644 --- a/etc/ceilometer/deprecated_pipeline.yaml +++ b/etc/ceilometer/deprecated_pipeline.yaml @@ -31,16 +31,20 @@ - "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" transformers: - name: "rate_of_change" parameters: source: map_from: - name: "disk\\.(read|write)\\.(bytes|requests)" + name: "(disk\\.device|disk)\\.(read|write)\\.(bytes|requests)" unit: "(B|request)" target: map_to: - name: "disk.\\1.\\2.rate" + name: "\\1.\\2.\\3.rate" unit: "\\1/s" type: "gauge" publishers: diff --git a/etc/ceilometer/pipeline.yaml b/etc/ceilometer/pipeline.yaml index a71ed095..12b45f2e 100644 --- a/etc/ceilometer/pipeline.yaml +++ b/etc/ceilometer/pipeline.yaml @@ -19,6 +19,10 @@ sources: - "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" sinks: - disk_sink - name: network_source @@ -52,11 +56,11 @@ sinks: parameters: source: map_from: - name: "disk\\.(read|write)\\.(bytes|requests)" + name: "(disk\\.device|disk)\\.(read|write)\\.(bytes|requests)" unit: "(B|request)" target: map_to: - name: "disk.\\1.\\2.rate" + name: "\\1.\\2.\\3.rate" unit: "\\1/s" type: "gauge" publishers: