A while ago, I tried to monitor our Nutanix Cluster with Check_MK by using SNMP.
So I started by writing some simple checks for it, but I wasn’t satisfied with the results.
So I was wondering what the possibilities would be by using the Nutanix REST-API.
I could tell you how difficult is was how to create the specialized agent for Check_MK, but I think that you are more interested in the end result.
Note: This guide is written for Debian 8 and written for a non-root user.
Commands that require elevated privileges are prefixed with [sudo]
The Nutanix Check_MK Package
First you need to download the custom build check. You can do that by clicking right here.
Install the Check_MK Package
The second step is to install the package on your Check_MK server.
Copy the package with for example “WinSCP” to the tmp-directory on Check_MK server
Open a SSH-session and log into your OMD site.
user@CMK01:~$ sudo omd su site01
Install the MKP-package and check if the package is installed successfully
OMD[site01]:~$ cmk -P install /tmp/agent_ntnx-3.0.1.mkp
OMD[site01]:~$ cmk -L | grep ntnx
Your output will look similar to the following
ntnx_alerts tcp (no man page present)
ntnx_clsinfo tcp (no man page present)
ntnx_container tcp (no man page present)
ntnx_hosts.cpu tcp (no man page present)
ntnx_hosts.info tcp (no man page present)
ntnx_hosts.maintenance tcp (no man page present)
ntnx_hosts.mem tcp (no man page present)
ntnx_hosts.vmcount tcp (no man page present)
ntnx_vms.cpu tcp (no man page present)
ntnx_vms.iops tcp (no man page present)
ntnx_vms.mem tcp (no man page present)
ntnx_vms.ngt tcp (no man page present)
ntnx_vms.pd tcp (no man page present)
ntnx_vms.running_on tcp (no man page present)
Now that the package is installed let’s add the Nutanix cluster into Check_MK
Create a Host
Open the Check_MK Webpage and go into “WATO”.
Add an Nutanix Cluster by choosing “Hosts” , “New host”.
- Enter a “Hostname”
- Add your “IP or FQDN address”
- Set the Agent Type for “Check_MK Agent”
- Save & Finish
Activate the specialized agent to start monitoring the Nutanix cluster.
Go to “Host and Service Parameters”, “Datasource Programs” and select “Check Nutanix via REST-API”
Create a new “Rule”. Leave it on “Main directory”
- Use the “Host Address” or a “IP or FQDN”
- Enter Nutanix Username with Password
- Select your current hypervisor (Acropolis or vSphere)
- Select one of the features you would like to monitor
Let’s go back to our Nutanix host and check if it has found some new “Unmonitored Services”
As you can see it has found 5 new “Services”.
Go into “WATO”, “Edit” your host and open “Services”
Click “Activate missing” to start monitoring the services below.
When we now go back to our Nutanix host you can see that services are active and your Nutanix cluster is monitored by Check_MK.
I hope this Nutanix check is useful for your Check_MK environment as it is for me.
This is not a finished product so if you have some suggestions or tips, just leave a comment below.
Thanks for reading.