mirror of
https://github.com/Napsty/check_esxi_hardware.git
synced 2024-11-22 02:13:46 +01:00
Merge pull request #21 from peternewman/master
Throw an unknown if we can't fetch the data for some reason
This commit is contained in:
commit
413dac781b
@ -38,6 +38,7 @@
|
|||||||
# Copyright (c) 2015 Andreas Gottwald
|
# Copyright (c) 2015 Andreas Gottwald
|
||||||
# Copyright (c) 2015 Stanislav German-Evtushenko
|
# Copyright (c) 2015 Stanislav German-Evtushenko
|
||||||
# Copyright (c) 2015 Stefan Roos
|
# Copyright (c) 2015 Stefan Roos
|
||||||
|
# Copyright (c) 2017 Peter Newman
|
||||||
#
|
#
|
||||||
# The VMware 4.1 CIM API is documented here:
|
# The VMware 4.1 CIM API is documented here:
|
||||||
# http://www.vmware.com/support/developer/cim-sdk/4.1/smash/cim_smash_410_prog.pdf
|
# http://www.vmware.com/support/developer/cim-sdk/4.1/smash/cim_smash_410_prog.pdf
|
||||||
@ -669,6 +670,9 @@ if vendor=='auto':
|
|||||||
if ( args[1].find('Socket error') >= 0 ):
|
if ( args[1].find('Socket error') >= 0 ):
|
||||||
print "UNKNOWN: %s" %args
|
print "UNKNOWN: %s" %args
|
||||||
sys.exit (ExitUnknown)
|
sys.exit (ExitUnknown)
|
||||||
|
elif ( args[1].find('ThreadPool --- Failed to enqueue request') >= 0 ):
|
||||||
|
print "UNKNOWN: %s" %args
|
||||||
|
sys.exit (ExitUnknown)
|
||||||
else:
|
else:
|
||||||
verboseoutput("Unknown CIM Error: %s" % args)
|
verboseoutput("Unknown CIM Error: %s" % args)
|
||||||
except pywbem.cim_http.AuthError,arg:
|
except pywbem.cim_http.AuthError,arg:
|
||||||
@ -697,6 +701,9 @@ for classe in ClassesToCheck :
|
|||||||
if ( args[1].find('Socket error') >= 0 ):
|
if ( args[1].find('Socket error') >= 0 ):
|
||||||
print "UNKNOWN: %s" %args
|
print "UNKNOWN: %s" %args
|
||||||
sys.exit (ExitUnknown)
|
sys.exit (ExitUnknown)
|
||||||
|
elif ( args[1].find('ThreadPool --- Failed to enqueue request') >= 0 ):
|
||||||
|
print "UNKNOWN: %s" %args
|
||||||
|
sys.exit (ExitUnknown)
|
||||||
else:
|
else:
|
||||||
verboseoutput("Unknown CIM Error: %s" % args)
|
verboseoutput("Unknown CIM Error: %s" % args)
|
||||||
except pywbem.cim_http.AuthError,arg:
|
except pywbem.cim_http.AuthError,arg:
|
||||||
|
Loading…
Reference in New Issue
Block a user