VMware ESXi & VCenter used disk percentage monitoring

GitHub: https://github.com/7layerorg/Monitoring/tree/master/Nagios/ESXi

The next article is about SNMP monitoring with Nagios to check VMware ESXi and VCenter servers used disk size.

I’ve had some trouble recently with our VCenter server because the logs just filled up one of the volume and I was unable to log in to the server at all.
Even the main console didn’t work and it was complaining about the storage filling up with logs.
VCenter server do not log rotate the old logs unfortunately by default, so sooner or later the volume will be filled up.

Well there are some solutions to monitor used disk size but the default Nagios won’t give you straight and appropriate answer from the VCenter server or form the ESXi boxes either.
This is why I made a script with SNMPwalk to be able to monitor any kind of ESXi or VCenter servers.
There are some “tricks” in the script because for VCenter need a different OID to check than on ESXi boxes, but this is built in to the script already.
Also there is a way to monitor disk size with SNMP under Cacti monitoring server but to receive an email regarding to the triggers you will need to modify way too many thresholds and would take ages if you have several servers.

With this script you will need to add only the host names and the disk number and you are all set, Nagios will take care all of the rest.
The check_vmware_disk script needs to be uploaded into your Nagios libexec folder, so Nagios will be able to run the script automatically when it’s been scheduled.

There are some pictures regarding to this service:

Also the second script which is available via my GitHub account is to check the ESXi host’s network up-link.
root@nagios: ./check_esxi_vnic 10.0.4.71 1
up
0 status:0; Triggers: down; OK – up

root@nagios: ./check_esxi_vnic 10.0.4.71 2
down
1 status:1; Triggers: down; CRITICAL – down

 

 

 
Show Buttons
Hide Buttons