From 7d150d578232f9fe4847035d0dd4b9ae9126d146 Mon Sep 17 00:00:00 2001 From: mpursley Date: Thu, 31 Jan 2019 03:40:37 -0800 Subject: [PATCH] add physical disk "state" to megaraid_pd_info metric (#1226) Signed-off-by: Matt Pursley --- text_collector_examples/storcli.py | 5 +++-- 1 file 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 pd_baselabel = 'controller="{}",enclosure="{}",slot="{}"'.format(controller_index, enclosure, slot) pd_info_label = pd_baselabel + \ - ',disk_id="{}",interface="{}",media="{}",model="{}",DG="{}"'.format( + ',disk_id="{}",interface="{}",media="{}",model="{}",DG="{}",state="{}"'.format( str(physical_drive.get('DID')).strip(), str(physical_drive.get('Intf')).strip(), str(physical_drive.get('Med')).strip(), str(physical_drive.get('Model')).strip(), - str(physical_drive.get('DG')).strip()) + str(physical_drive.get('DG')).strip(), + str(physical_drive.get('State')).strip()) drive_identifier = 'Drive /c' + str(controller_index) + '/e' + str(enclosure) + '/s' + str( slot)