diff options
author | mpursley <mpursley@gmail.com> | 2019-01-31 03:40:37 -0800 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2019-01-31 12:40:37 +0100 |
commit | 7d150d578232f9fe4847035d0dd4b9ae9126d146 (patch) | |
tree | 2ec84fb016628b321cc883263b5fab279cb9744b /text_collector_examples | |
parent | 40dce45d8dfd5f89abc00eb94a4a252d755e0552 (diff) | |
download | prometheus_node_collector-7d150d578232f9fe4847035d0dd4b9ae9126d146.tar.bz2 prometheus_node_collector-7d150d578232f9fe4847035d0dd4b9ae9126d146.tar.xz prometheus_node_collector-7d150d578232f9fe4847035d0dd4b9ae9126d146.zip |
add physical disk "state" to megaraid_pd_info metric (#1226)
Signed-off-by: Matt Pursley <mpursley@gmail.com>
Diffstat (limited to 'text_collector_examples')
-rwxr-xr-x | text_collector_examples/storcli.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/text_collector_examples/storcli.py b/text_collector_examples/storcli.py index 9935e88..7f229e5 100755 --- a/text_collector_examples/storcli.py +++ b/text_collector_examples/storcli.py | |||
@@ -148,12 +148,13 @@ def create_metrcis_of_physical_drive(physical_drive, detailed_info_array, contro | |||
148 | pd_baselabel = 'controller="{}",enclosure="{}",slot="{}"'.format(controller_index, enclosure, | 148 | pd_baselabel = 'controller="{}",enclosure="{}",slot="{}"'.format(controller_index, enclosure, |
149 | slot) | 149 | slot) |
150 | pd_info_label = pd_baselabel + \ | 150 | pd_info_label = pd_baselabel + \ |
151 | ',disk_id="{}",interface="{}",media="{}",model="{}",DG="{}"'.format( | 151 | ',disk_id="{}",interface="{}",media="{}",model="{}",DG="{}",state="{}"'.format( |
152 | str(physical_drive.get('DID')).strip(), | 152 | str(physical_drive.get('DID')).strip(), |
153 | str(physical_drive.get('Intf')).strip(), | 153 | str(physical_drive.get('Intf')).strip(), |
154 | str(physical_drive.get('Med')).strip(), | 154 | str(physical_drive.get('Med')).strip(), |
155 | str(physical_drive.get('Model')).strip(), | 155 | str(physical_drive.get('Model')).strip(), |
156 | str(physical_drive.get('DG')).strip()) | 156 | str(physical_drive.get('DG')).strip(), |
157 | str(physical_drive.get('State')).strip()) | ||
157 | 158 | ||
158 | drive_identifier = 'Drive /c' + str(controller_index) + '/e' + str(enclosure) + '/s' + str( | 159 | drive_identifier = 'Drive /c' + str(controller_index) + '/e' + str(enclosure) + '/s' + str( |
159 | slot) | 160 | slot) |