mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 02:13:44 +01:00
check_eva - minor bugfixes
This commit is contained in:
parent
92a6643a4b
commit
c6cb2b634d
@ -447,7 +447,7 @@ def check_operationalstate(my_object, print_failed_objects=False,namefield='obje
|
||||
|
||||
def check_generic(command="ls disk full",namefield="objectname", perfdata_fields=None, longserviceoutputfields=None, detailedsummary=False):
|
||||
if not perfdata_fields:
|
||||
perfdata_fields = ['good']
|
||||
perfdata_fields = []
|
||||
if not longserviceoutputfields:
|
||||
longserviceoutputfields = []
|
||||
global perfdata
|
||||
@ -493,7 +493,7 @@ def check_generic(command="ls disk full",namefield="objectname", perfdata_fields
|
||||
|
||||
for field in perfdata_fields:
|
||||
if field == '': continue
|
||||
add_perfdata( "'%s%s'=%s " % (identifier, field, i[field]) )
|
||||
add_perfdata( "'%s%s'=%s " % (identifier, field, i.get(field,None) ))
|
||||
|
||||
# Disk group gets a special perfdata treatment
|
||||
if command == "ls disk_group full":
|
||||
@ -703,4 +703,3 @@ else:
|
||||
print_help()
|
||||
print "* Error: Mode %s not found" % mode
|
||||
exit(unknown)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user