mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 10:23:46 +01:00
This commit is contained in:
parent
2887a079b0
commit
580c3ea338
Binary file not shown.
@ -27,14 +27,18 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Some Defaults
|
||||||
|
show_perfdata = True
|
||||||
|
show_longserviceoutput = True
|
||||||
|
debugging = False
|
||||||
|
|
||||||
|
|
||||||
# First some defaults
|
|
||||||
|
# check_eva defaults
|
||||||
hostname="localhost"
|
hostname="localhost"
|
||||||
username="eva"
|
username="eva"
|
||||||
password="eva1234"
|
password="eva1234"
|
||||||
mode="check_systems"
|
mode="check_systems"
|
||||||
debugging = False
|
|
||||||
path=''
|
path=''
|
||||||
|
|
||||||
# No real need to change anything below here
|
# No real need to change anything below here
|
||||||
@ -119,6 +123,14 @@ while len(arguments) > 0:
|
|||||||
error("Invalid --mode %s" % arg)
|
error("Invalid --mode %s" % arg)
|
||||||
elif arg == '-d' or arg == '--debug':
|
elif arg == '-d' or arg == '--debug':
|
||||||
debugging=True
|
debugging=True
|
||||||
|
elif arg == '--longserviceoutput':
|
||||||
|
show_longserviceoutput = True
|
||||||
|
elif arg == '--no-longserviceoutput':
|
||||||
|
show_longserviceoutput = False
|
||||||
|
elif arg == '--perfdata':
|
||||||
|
show_perfdata = True
|
||||||
|
elif arg == '--no-perfdata':
|
||||||
|
show_perfdata = False
|
||||||
elif arg == '-h' or '--help':
|
elif arg == '-h' or '--help':
|
||||||
print_help()
|
print_help()
|
||||||
exit(ok)
|
exit(ok)
|
||||||
@ -257,8 +269,12 @@ def run_sssu(system=None, command="ls system full"):
|
|||||||
return objects
|
return objects
|
||||||
|
|
||||||
def end(summary,perfdata,longserviceoutput,nagios_state):
|
def end(summary,perfdata,longserviceoutput,nagios_state):
|
||||||
|
global show_longserviceoutput
|
||||||
|
global show_perfdata
|
||||||
|
if not show_perfdata: perfdata = ""
|
||||||
print "%s - %s | %s" % (state[nagios_state], summary,perfdata)
|
print "%s - %s | %s" % (state[nagios_state], summary,perfdata)
|
||||||
print longserviceoutput
|
if show_longserviceoutput:
|
||||||
|
print longserviceoutput
|
||||||
exit(nagios_state)
|
exit(nagios_state)
|
||||||
|
|
||||||
def check_systems():
|
def check_systems():
|
||||||
@ -523,7 +539,7 @@ def set_path():
|
|||||||
current_path = getenv('PATH')
|
current_path = getenv('PATH')
|
||||||
if path == '':
|
if path == '':
|
||||||
if current_path.find('C:\\') > -1: # We are on this platform
|
if current_path.find('C:\\') > -1: # We are on this platform
|
||||||
path = "C:\Program Files\Hewlett-Packard\Sanworks\Element Manager for StorageWorks HSV"
|
path = "C:\\Program Files\\Hewlett-Packard\\Sanworks\\Element Manager for StorageWorks HSV"
|
||||||
else:
|
else:
|
||||||
path = "/usr/local/bin"
|
path = "/usr/local/bin"
|
||||||
current_path = "%s:%s" % (current_path,path)
|
current_path = "%s:%s" % (current_path,path)
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user