mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-21 18:03:45 +01:00
Fixed output to be more compatible
My SSSU 10.1.0 reports "SSSU for HP P6000 Command View" instead of "SSSU for HP StorageWorks Command View EVA". I fixed the output to just check for SSSU for HP
This commit is contained in:
parent
9b2474fb49
commit
04d25281e3
@ -49,7 +49,7 @@ timeout = 0 # 0 means no timeout
|
||||
server_side_troubleshooting = False
|
||||
|
||||
# No real need to change anything below here
|
||||
version = "1.0"
|
||||
version = "1.0.1"
|
||||
ok = 0
|
||||
warning = 1
|
||||
critical = 2
|
||||
@ -239,15 +239,15 @@ def run_sssu(system=None, command="ls system full"):
|
||||
if output.pop(0).strip() != '':
|
||||
error = 1
|
||||
if output.pop(0).strip() != '':
|
||||
error = 1
|
||||
if output.pop(0).strip() != 'SSSU for HP StorageWorks Command View EVA':
|
||||
error = 1
|
||||
error = 2
|
||||
if output.pop(0).strip().find('SSSU for HP') != 0:
|
||||
error = 3
|
||||
if output.pop(0).strip().find('Version:') != 0:
|
||||
error = 1
|
||||
error = 4
|
||||
if output.pop(0).strip().find('Build:') != 0:
|
||||
error = 1
|
||||
error = 5
|
||||
if output.pop(0).strip().find('NoSystemSelected> ') != 0:
|
||||
error = 1
|
||||
error = 6
|
||||
#if output.pop(0).strip() != '': error = 1
|
||||
#if output.pop(0).strip().find('NoSystemSelected> ') != 0: error=1
|
||||
#if output.pop(0).strip() != '': error = 1
|
||||
@ -260,7 +260,7 @@ def run_sssu(system=None, command="ls system full"):
|
||||
if i.find('information:') > 0:
|
||||
break
|
||||
if error > 0:
|
||||
print "Error running the sssu command"
|
||||
print "Error running the sssu command: " + str(error)
|
||||
print commandstring
|
||||
print str_buffer
|
||||
exit(unknown)
|
||||
|
Loading…
Reference in New Issue
Block a user