Under ESX 4, we had a number of Nagios checks set up making SNMP GET calls to keep an eye on the hardware status of our ESX hosts, such as fan status, temperature sensors, and so on.
With ESXi5 having locked out snmp GET and SET functions, I have been exploring the use of the esxcli shell as a replacement.
However, the cli commands to check such hardware elements appear to be supported under ESX 4 but not on 5i. For example, I can see the status of the disk LUNs presented by the SAN but not the physical disks behind them, nor any hardware sensors.
I know that an snmp trap can be created, or for that matter an alarm in vcenter, but those approaches are not as proactive as actively checking the element state through a query - and they leave a blind spot if there is an issue with message transport or reception.
Has anyone found a way to get this information on the 5i platform? I hate having such a huge blind spot to the health of my data center.
Cheers
The SNMP stuff was replaced by WBEM/CIM monitoring, which gives you mostly the same data.
Here's a sample script for you:
Looks promising, thanks. Will give it a whirl and confirm if it solves my issue.
Hi Matt, hope you are still following this thread.
Not sure if this is a setup issue or because I am connecting to a 5i host instead of 4i which is what that article reported as tested on.
I get the following errors when I try to run a test...
# python check_esx_wbem.py esx-002.mydomain root mypassword mailto:Kl$.Mv@K
Traceback (most recent call last):
File "check_esx_wbem.py", line 75, in ?
instance_list = wbemclient.EnumerateInstances(classe)
File "/usr/lib/python2.4/site-packages/pywbem/cim_operations.py", line 403, in EnumerateInstances
ClassName = CIMClassName(ClassName),
File "/usr/lib/python2.4/site-packages/pywbem/cim_operations.py", line 173, in imethodcall
raise CIMError(0, str(arg))
pywbem.cim_operations.CIMError: (0, 'Invalid URL')
Any suggestions?
My fault - though the notes indicated you could call it just using the host name , user & password, it worked as soon as I wrapped it into a URL
(https://hostname:5989 etc)
Problem solved - many thanks!