[HOWTO] Monitor Vmware hardware health of ESXI (free)

Started by Hanfelt, April 12, 2017, 11:17:33 AM

Previous topic - Next topic

Hanfelt

First download Activestate Python 2.7
https://www.activestate.com/activepython/downloads

Then open cmd and enter:
python -m easy_install pywbem

Download nagios vmware plugin from this post its attached or here: https://exchange.nagios.org/directory/Plugins/Operating-Systems/%2A-Virtual-Environments/VMWare/Check-hardware-running-VMware-ESXi/details

Put this file somewhere on your drive like C:\Scripts

Open your agents config file (nxagentd.conf) and add:
ExternalParameter = ESXIStatusServer2:python.exe C:\Scripts\check_esx_wbem.py https://ip.to.esxi.server:5989 username password
ExecTimeout = 10000

ip.to.esxi.server=ip to your esxi server
username=username to esxi server
password=password to esxi server

Open upp netxms server configuration and change  AgentCommandTimeout = 10000

Restart agent

After a while you can collect this information from you data collection configuration on the server you installed this script.

If nothing shows up you can stop your netxms agent and start it manually in cmd nxagentd.exe -f -D 5 that way you can see whats happening and if something is wrong.

Howto show the DCI on the ESXI node instead of the polling server.

Open up data collection configuration on the node making the checks and right click on the DCI choose move to another node and select your ESXI server.
Then you open your ESXI nodes data collection configuration your DCI check should be here, edit this one and on the General page you will find an option called "source node" select the node that runs the script. Thanks Victor ;)


Hanfelt

Thoose checks will end up showing on the monitor server itself not on the esxi servers details page. Is there anyway we can redirect thoose outputs to show up on the esxi object instead? I looked up nxapush but couldnt redirect that to another host. One idea would be to create a DCI on a object (ESXI) and then use nxapush to pass the id of that DCI that i would like to send the data to.

Victor Kirhenshtein

Hi,

you can define same DCIs on ESXi and set source node to management server. That way actual data collection will occur on management server but data will be shown on ESXi node.

Best regards,
Victor

Hanfelt

Victor you have thought of everything it seems ;) Thanks for the clarification i need to rtfm.

I got another question can we choose how often ExternalParameter script runs? Like the ExternalParametersProvider?

Victor Kirhenshtein

External parameter runs on demand, when server requests it. So you effectively control it when setting DCI polling interval.

Best regards,
Victor