Merge "Add per device rate metrics for instances"
This commit is contained in:
commit
32fb415d78
|
@ -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