From ecf93a695e4e5351ac7b1ec7c06155527b279761 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 24 Jan 2017 17:57:28 +0000 Subject: [PATCH] Throw an unknown if we can't fetch the data for some reason --- check_esxi_hardware.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/check_esxi_hardware.py b/check_esxi_hardware.py index cf70e83..1daebb2 100755 --- a/check_esxi_hardware.py +++ b/check_esxi_hardware.py @@ -38,6 +38,7 @@ # Copyright (c) 2015 Andreas Gottwald # Copyright (c) 2015 Stanislav German-Evtushenko # Copyright (c) 2015 Stefan Roos +# Copyright (c) 2017 Peter Newman # # 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 @@ -643,6 +644,9 @@ if vendor=='auto': if ( args[1].find('Socket error') >= 0 ): print "UNKNOWN: %s" %args sys.exit (ExitUnknown) + elif ( args[1].find('ThreadPool --- Failed to enqueue request') >= 0 ): + print "UNKNOWN: %s" %args + sys.exit (ExitUnknown) else: verboseoutput("Unknown CIM Error: %s" % args) except pywbem.cim_http.AuthError,arg: