Page 1 of 1

check esxi not working

Posted: Mon Dec 19, 2022 4:08 am
by ammu440
Hi all,

Can anyone help me here I am facing issues with the plugin check_esxi_hardware.
I have the following connection issues, but when i check on esxi server, the ports CIM server is running.

'/usr/lib/nagios/plugins/check_esxi.py' '--host' 'hostname' '--user' 'user' '--pass' 'password' '-p' -V 'hp'

File "/usr/lib/nagios/plugins/check_esxi.py", line 804, in <module>
instance_list = wbemclient.EnumerateInstances(classe)
File "/usr/local/lib/python2.7/dist-packages/pywbem/_cim_operations.py", line 3060, in EnumerateInstances
PropertyList=PropertyList)
File "/usr/local/lib/python2.7/dist-packages/pywbem/_cim_operations.py", line 1950, in _imethodcall
self, request_data, cimxml_headers)
File "/usr/local/lib/python2.7/dist-packages/pywbem/_cim_http.py", line 494, in wbem_request
timeout=(HTTP_CONNECT_TIMEOUT, conn.timeout))
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 577, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 450, in send
timeout=timeout
File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 828, in urlopen
**response_kw
File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 828, in urlopen
**response_kw
File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 710, in urlopen
chunked=chunked,
File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "/usr/local/lib/python2.7/dist-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/usr/local/lib/python2.7/dist-packages/urllib3/connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python2.7/dist-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)

Re: check esxi not working

Posted: Mon Nov 13, 2023 11:55 am
by ssunga
Thanks for reaching out, @ammu440!

It looks like you're encountering a complex issue with the check_esxi_hardware plugin in Nagios. Based on your error logs, this seems to be a connection issue when your script tries to communicate with the ESXi server.

Here are a few troubleshooting steps:

1. Network Connectivity: Make sure that the Nagios server can reach the ESXi server over the network. Try pinging the ESXi server from Nagios.

2. Port Accessibility: Confirm that the ports required for communication with the CIM server are open and accessible from the Nagios server.

3. Plugin Configuration: Double-check the configuration of your check_esxi_hardware plugin. Sometimes, a small misconfiguration can cause such issues.

4. Python Environment: Since the script is in Python 2.7, ensure that all the dependencies are correctly installed and that there's no version mismatch that might be causing this problem.

5. Check Logs: Look into the ESXi and Nagios logs for any additional clues that might point to the root cause of this issue.

Hope this helps! Keep us updated on your progress.