In order for your Centos server to properly speak to Vcenter servers you will need to install the pysphere package. This can be downloaded from github as follows:
Browse to https://github.com/argos83/pysphere – From here you can download a zip file with all of the required files included. Once you have downloaded the zip, extract this and run the setup.py file included
python setup.py install
The next stage will be to add your vmware host to your main.cf file in the usual format. In the below example I will be using an example vmware server with hostname th-esxi1 – Where you see this you should replace this with the hostname for your server:
Once you have done this, you will need to call the external datasource program for Vmware esxi monitoring as below. This should be outside of your hosts section (Eg right at the bottom of the file).
“/usr/share/check_mk/agents/special/agent_vsphere -u ‘root’ -s ‘[esxi-root-password]’ “
“-i hostsystem,virtualmachine,datastore,counters –direct “
If you are using the above to monitor a vcenter server, you should remove the –direct option from line 3.
If you use an alternative port for your vmware server or are configuring this over a WAN link you can use the flag -p to define this port number at the end of the second line (example below):
“/usr/share/check_mk/agents/special/agent_vsphere -u ‘root’ -s ‘[esxi-root-password]’ -p 3443 “
Once you have done this, you should save and close the file and re-inventory your host before reloading Check_MK
cmk -II th-esxi1