Add per device rate metrics for instances
This change add pipline configuration support to gether per device rate metrics for instance. The per device rate metrics for instances is transform from the metrics of per devices for instances by adding metrics to disk_pipline in pipline cfg. These metrics will be independent of the support of per devices rate metrics provided by inspector. This thange will add the following metrics: - "disk.device.read.bytes.rate" - "disk.device.read.requests.rate" - "disk.device.write.bytes.rate" - "disk.device.write.requests.rate" Change-Id: I908ab40cc77966238944060e33603c5f4c440634
This commit is contained in:
parent
6eac318612
commit
acfcb91186
@ -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')
|
||||
|
@ -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')
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user