mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-12-22 17:13:52 +01:00
This commit is contained in:
parent
cf6c7c40ad
commit
0898ab032e
@ -416,7 +416,7 @@ def check_operationalstate(object, print_failed_objects=False,namefield='objectn
|
||||
if not object.has_key(detailfield): detailfield = statefield
|
||||
if object['operationalstate'] not in valid_states:
|
||||
if print_failed_objects:
|
||||
long("Warning, %s=%s (%s)\n" % ( object[namefield], object['operationalstate'], object[detailfield] ))
|
||||
long("- Warning, %s=%s (%s)\n" % ( object[namefield], object['operationalstate'], object[detailfield] ))
|
||||
return warning
|
||||
debug( "OK, %s=%s (%s)\n" % ( object[namefield], object['operationalstate'], object[detailfield] ) )
|
||||
return ok
|
||||
@ -492,7 +492,8 @@ def check_generic(command="ls disk full",namefield="objectname", perfdata_fields
|
||||
nagios_state = max(nagios_state, check_multiple_objects(i, 'fibrechannelports'))
|
||||
nagios_state = max(nagios_state, check_multiple_objects(i, 'modules'))
|
||||
for x in longserviceoutputfields:
|
||||
long( "- %s = %s\n" % (x, i[x]))
|
||||
if i.has_key( x ):
|
||||
long( "- %s = %s\n" % (x, i[x]))
|
||||
|
||||
end(summary,perfdata,longserviceoutput,nagios_state)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user