mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 18:33:45 +01:00
This commit is contained in:
parent
5f68c6b671
commit
ae860c58be
@ -143,7 +143,7 @@ def runCommand(command):
|
|||||||
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE,)
|
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE,)
|
||||||
stdout, stderr = proc.communicate('through stdin to stdout')
|
stdout, stderr = proc.communicate('through stdin to stdout')
|
||||||
if proc.returncode > 0:
|
if proc.returncode > 0:
|
||||||
print "Errorcode %s on command '%s' (%s)" % (proc.returncode,command, stderr.strip())
|
print "Error %s: %s\n command was: '%s'" % (proc.returncode,stderr.strip(),command)
|
||||||
#print stderr, stdout
|
#print stderr, stdout
|
||||||
exit(unknown)
|
exit(unknown)
|
||||||
else:
|
else:
|
||||||
@ -444,8 +444,8 @@ def check_controllers():
|
|||||||
#longserviceoutput = longserviceoutput + get_longserviceoutput(i, interesting_fields.split('|') )
|
#longserviceoutput = longserviceoutput + get_longserviceoutput(i, interesting_fields.split('|') )
|
||||||
#longserviceoutput = longserviceoutput + "\n%s/%s\n"%(systemname,controllername)
|
#longserviceoutput = longserviceoutput + "\n%s/%s\n"%(systemname,controllername)
|
||||||
long( "\n%s/%s = %s (%s)\n"%(systemname,controllername,i['operationalstate'], i['operationalstatedetail']) )
|
long( "\n%s/%s = %s (%s)\n"%(systemname,controllername,i['operationalstate'], i['operationalstatedetail']) )
|
||||||
long( "-firmwareversion = %s \n" %(i['firmwareversion']))
|
long( "- firmwareversion = %s \n" %(i['firmwareversion']))
|
||||||
long( "-serialnumber = %s \n" %(i['serialnumber']))
|
long( "- serialnumber = %s \n" %(i['serialnumber']))
|
||||||
|
|
||||||
|
|
||||||
controllertemperaturestatus = not_present
|
controllertemperaturestatus = not_present
|
||||||
|
Loading…
Reference in New Issue
Block a user