as i’ve been searching the internet for some hours now to find a suitable script to check my esxi 6.7 datastores remaining disk space and couldn’t find a working plugin, i want to ask if anyone has recommendations for a working and not outdated check script or how i could achieve this.
Note: Login to your esxi and go to your volumes directory.
“ls -l” will show the datastores with the name and Oid. Your snmp check must resolv the Oid. You can set your favorite name in { descr = “” }
before we recommend anything, which scripts have you tested and evaluated thus far?
Which transport do you use for accessing the host, via VMWare API or with a direct agent connection to that ESXI host?
uff, i feel like i’ve tried almost every scripts on icinga exchange and some scripts on nagios exchange.
I already use the check_esx_hardware script to monitor my hardware via cim.
Would be great to get the data without the need to install an agent.
Yeah, i tried that last night but got errors regarding missing perl modules like Nagios::Plugin (fixed that by changing the script to Monitoring::Plugin) and now missing help.pm. It was late and i didn’t try any further.
But i was hoping for a script that doesn’t need to install the vmware SDK and so on like with check_esx_hardware.
Yeah, check_vmware_esx is somehow unmaintained, my PR for better docs isn’t merged since 2017. I cannot fork and maintain that plugin, since I don’t have any test infrastructure
The repository has a Makefile, which should compile all required packages into a single binary, I’d assume that help.pm is then part of this.
make all
cp check_vmware_esx /usr/lib/nagios/plugins/
chmod 755 /usr/lib/nagios/plugins/check_vmware_esx
In terms of check_esxi_hardware, this is well maintained by Claudio Künzler and should work with recent VMWare SDKs.
Using/installing the VMware SDK can be a pain in the ass, but as you already have check_esxi_hardware running, I suppose the SDK is working alright.
I just install the check_vmware_esx script like this
git -C /usr/local/src clone https://github.com/BaldMansMojo/check_vmware_esx.git check_vmware_esx
cd /usr/local/src/check_vmware_esx
make all
cp check_vmware_esx /usr/lib/nagios/plugins/
cd -
Other than that the script normally works pretty good.
Recently I have tried the Icinga Web 2 vspheredb module, which gives you a nice overview about your hosts/vms/clusters. But the checks you can run against the module are still very basic, and I have no idea what they will do, if something fails.
Well, got check_vmware_esx.pl finally working…kind of. I copied the modules folder of the git repo to my script folder. Also downgraded to vmware Perl SDK 5.5. Now i get a warning but also the values.
check_esxi_hardware is working well for me. But unfortunately it doesn’t give me any datastore infos.
I’ll continue my tests with check_vmware_esx.pl now until i find something better. As you say it is unmaintained for quite a long time.
Thank you all for your suggestions. If anyone has more input for me, pls keep going.
I first installed SDK 6.7 and it threw me an error. Something with version blabla. So i installed 5.5 as it is recommended in the script docs.
The Warning i get is:
Possible precedence issue with control flow operator at /usr/share/perl/5.26/VMware/VICommon.pm line 2147.
Warning: The session being saved to ‘/tmp/_session’ is expired or not authenticated.
OK: OK for selected volume(s).
…
I am stuck and in need for some assistance with installing check_vmware_esx.
Unless I am doing something seriously wrong, I would say that installation of VMWare Perl SDK 6.5 went well.
After several attempts and installing missing Perl modules, I have completed installation and currently all installed binaries are in /usr/bin:
check_vmware_esx is a plugin script which uses the VMware SDK for checking vcenters, hosts and VMs.
It does not come with the SDK. You have to download it additionally.
As I have written before, I would recommend the module instead of the SDK+script.
I would suggest you open a new Topic in the Service Monitoring section.
There you can describe the Problem you have in Detail, including error Messages and the steps you have done so far as well as the versions of icinga2 and the modules.
I personally have never used the vsphere moule for the Director Import source, so without any detailed error description I (and others) can’t help.
Also I would still encourage you to take a look at the vspheredb module.
It works so much better than the check scripts and has a nice Dashboard as well