1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-05 01:53:44 +01:00
This commit is contained in:
Páll Guðjón Sigurðsson 2010-10-25 17:48:59 +00:00
parent b5f08211f3
commit 1ccb5e700d
3 changed files with 5 additions and 1 deletions

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 )