Page 1 of 1
check_esx3 0.2 and 0.5 problem with netowrk monitoring
Posted: Mon Apr 16, 2018 2:02 am
by Eurocash
Hi,
I'm trying to add VMware ESXi version 6.5 host to monitoring, and I cannot get network monitoring to work.
CPU, Input/Output, Datastore Usage, Memory, Services and VM Status are working as expected on 0.2 version of plugin.
This is output from original 0.2 plugin:
Code: Select all
[nagios@nagios ~]$ /usr/local/nagios/libexec/check_esx3.pl -H "esxhost" -f "/usr/local/nagiosxi/etc/components/vmware/esxhost_auth.txt" -l "NET"
ESX3 CRITICAL - Can't use an undefined value as an ARRAY reference at /usr/local/nagios/libexec/check_esx3.pl line 872. | net_receive=48.00KB;; net_send=3.00KB;;
On 0.5 Netowrking and Memory is not working. So I have edited just the Networking service by adding v0.5 plugin with other name. But it gives no output:
Code: Select all
[nagios@nagios~]$ /usr/local/nagios/libexec/check_esx3_0.5.pl -H "esxhost" -f "/usr/local/nagiosxi/etc/components/vmware/esxhost_auth.txt" -l "NET"
I assume that VMware Perl SDK is installed correctly, most of services are monitored correctly.
I will add more hosts (also with older VMware ESXi version, I think it was 5.5).
Any advice to get network in monitoring?
Re: check_esx3 0.2 and 0.5 problem with netowrk monitoring
Posted: Mon Apr 16, 2018 10:12 am
by lmiltchev
Do you get any output if you run your checks with increased verbosity?
Examples:
Code: Select all
/usr/local/nagios/libexec/check_esx3_0.5.pl -H "esxhost" -f "/usr/local/nagiosxi/etc/components/vmware/esxhost_auth.txt" -l "NET" -vvv
/usr/local/nagios/libexec/check_esx3_0.5.pl -H "esxhost" -f "/usr/local/nagiosxi/etc/components/vmware/esxhost_auth.txt" -l "MEM" -vvv
What is the SDK version that you installed on the Nagios XI server?
Re: check_esx3 0.2 and 0.5 problem with netowrk monitoring
Posted: Tue Apr 17, 2018 1:50 am
by Eurocash
SDK version:
VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.tar.gz
output for NET:
Code: Select all
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check_esx3_0.5.pl line 31.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3_0.5.pl line 31.
outpu for MEM is the same:
Code: Select all
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check_esx3_0.5.pl line 31.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3_0.5.pl line 31.
Check_esx version 0.2.1 has no problem with that. And I think that I know now why it is not showing the network in some hosts. I'm not administrator of ESXi so I do not have access to those. But some machines are working with 0.2.1! It looks like hosts have diffrent Networking sections. I have checked with ESX admin and some have the vswitch in networking secition, some of them not. I do not know good enough perl and I have not investigated the script but I think that if there is no vswitch it throughs critical.
Re: check_esx3 0.2 and 0.5 problem with netowrk monitoring
Posted: Tue Apr 17, 2018 4:53 am
by Eurocash
I have one more information. We are using dvswitch (distributed vswitch) is there any option to monitor them instead of standard vswitch?
Re: check_esx3 0.2 and 0.5 problem with netowrk monitoring
Posted: Tue Apr 17, 2018 8:08 am
by scottwilkerson
Eurocash wrote:SDK version:
VMware-vSphere-Perl-SDK-6.5.0-4566394.x86_64.tar.gz
output for NET:
Code: Select all
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check_esx3_0.5.pl line 31.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3_0.5.pl line 31.
outpu for MEM is the same:
Code: Select all
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check_esx3_0.5.pl line 31.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_esx3_0.5.pl line 31.
Check_esx version 0.2.1 has no problem with that. And I think that I know now why it is not showing the network in some hosts. I'm not administrator of ESXi so I do not have access to those. But some machines are working with 0.2.1! It looks like hosts have diffrent Networking sections. I have checked with ESX admin and some have the vswitch in networking secition, some of them not. I do not know good enough perl and I have not investigated the script but I think that if there is no vswitch it throughs critical.
In this new version you need to edit the plugin and everywhere you find this
replace with this
Your previous version which we distributed was already modified.
Eurocash wrote:I have one more information. We are using dvswitch (distributed vswitch) is there any option to monitor them instead of standard vswitch?
According to this post they do work in 0.5.0 version
https://support.nagios.com/forum/viewto ... f=6&t=9327
Re: check_esx3 0.2 and 0.5 problem with netowrk monitoring
Posted: Wed Apr 18, 2018 2:16 am
by Eurocash
Thanks for help! Now everything is working and DVSWITCH is indeed monitored correctly.
In attachment modified check_esx3.pl which worked for me. Maybe someone will make use of this too.

Re: check_esx3 0.2 and 0.5 problem with netowrk monitoring
Posted: Wed Apr 18, 2018 7:00 am
by scottwilkerson
Thanks for sharing your modified version for others.