Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions check_eva/check_eva.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ def check_generic(command="ls disk full", namefield="objectname", perfdata_field
usedstoragespacegb = 0
occupancyalarmlvel = 0
warninggb = 0
gooddisks = 0
for i in objects:
systemname = i['systemname']
# Some versions of commandview use "objectname" instead of namefield
Expand Down Expand Up @@ -528,6 +529,12 @@ def check_generic(command="ls disk full", namefield="objectname", perfdata_field
add_perfdata("'%s%s'=%s " %
(identifier, field, i.get(field, None)))

# Count disks with operationalstate good
if command == "ls disk full":
if i['operationalstate'] == 'good':
gooddisks += 1
perfdata = "'Good Disks'=" + str(gooddisks)

# Disk group gets a special perfdata treatment
if command == "ls disk_group full":
totalstoragespacegb = float(i['totalstoragespacegb'])
Expand Down