1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-22 10:23:46 +01:00
This commit is contained in:
Páll Guðjón Sigurðsson 2010-10-25 17:47:39 +00:00
parent aa41dff1f5
commit b5f08211f3

View File

@ -441,7 +441,11 @@ def check_generic(command="ls disk full",namefield="objectname", perfdata_fields
summary = "%s objects found " % len(objects) summary = "%s objects found " % len(objects)
for i in objects: for i in objects:
systemname = i['systemname'] systemname = i['systemname']
# Some versions of commandview use "objectname" instead of namefield
if i.has_key( namefield ):
objectname = i[namefield] objectname = i[namefield]
else:
objectname = i['objectname']
# Lets see if this object is working # Lets see if this object is working
nagios_state = max( check_operationalstate(i), nagios_state ) nagios_state = max( check_operationalstate(i), nagios_state )