1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-12-22 09:03:54 +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)
for i in objects:
systemname = i['systemname']
objectname = i[namefield]
# Some versions of commandview use "objectname" instead of namefield
if i.has_key( namefield ):
objectname = i[namefield]
else:
objectname = i['objectname']
# Lets see if this object is working
nagios_state = max( check_operationalstate(i), nagios_state )