check_vmware_api.pl
Posted: Wed Jan 11, 2017 10:22 am
Hi, I'm trying to monitor my VSphere.
Had some problems getting this plugin to work (nothing with the plugin, rather the VMware vSphere SDK).
So I was very happy when eventually I got it working:
perl /usr/local/nagios/libexec/check_vmware_api.pl -H VCenter -u user -p password -l MEM
my command:
define command {
command_name check_vm
command_line perl $USER1$/check_vmware_api.pl -H VCenter -u user -p password -l $ARG1$
}
my service definition ..... check_command check_vm!MEM
The response I get:
Had some problems getting this plugin to work (nothing with the plugin, rather the VMware vSphere SDK).
So I was very happy when eventually I got it working:
perl /usr/local/nagios/libexec/check_vmware_api.pl -H VCenter -u user -p password -l MEM
BUT when I created it in Nagios it broke down again????CHECK_VMWARE_API.PL OK - mem usage=20132.40 MB (49.19%), overhead.....
my command:
define command {
command_name check_vm
command_line perl $USER1$/check_vmware_api.pl -H VCenter -u user -p password -l $ARG1$
}
my service definition ..... check_command check_vm!MEM
The response I get:
Can anybody tell me what's going wrong?Current Status: UNKNOWN (for 0d 0h 32m 47s)
Status Information: VMWARE_API UNKNOWN - Missing perl module VMware::VIRuntime. Download and install 'VMware vSphere SDK for Perl', available at https://my.vmware.com/group/vmware/downloads
Download the latest version of the vSphere SDK for Perl from VMware.
In this example we use VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz,
but the instructions should apply to other ve.....