CHECK_VMWARE_API.PL CRITICAL - Host "" does not exist

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
lzdravkov
Posts: 9
Joined: Mon Jul 06, 2020 2:58 am

CHECK_VMWARE_API.PL CRITICAL - Host "" does not exist

Post by lzdravkov »

Hello,

I'm facing an issue while using the plugin check_vmware_api.pl .
As it is visible in the error it says that the Host does not exist.

/usr/local/nagios/libexec/check_vmware_api.pl -H myvmware01 -f "/usr/local/nagiosxi/etc/components/vmware/myvmware01_auth.txt" -l "CPU"
Use of uninitialized value in concatenation (.) or string at /usr/local/nagios/libexec/check_vmware_api.pl line 957.
CHECK_VMWARE_API.PL CRITICAL - Host "" does not exist

The DNS is okay and the host exist, so any ideas what could be the problem?
Thanks in advance.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: CHECK_VMWARE_API.PL CRITICAL - Host "" does not exist

Post by gormank »

ping myvmware01
Run the check command using the IP instead of the hostname.
lzdravkov
Posts: 9
Joined: Mon Jul 06, 2020 2:58 am

Re: CHECK_VMWARE_API.PL CRITICAL - Host "" does not exist

Post by lzdravkov »

gormank wrote:ping myvmware01
Run the check command using the IP instead of the hostname.
Thanks for the comment Gormank,

I tried it but it still does not work.

#ping myvmware01
#PING ping myvmware01 (10.10.20.11) 56(84) bytes of data.
#64 bytes from myvmware01 (10.10.20.11): icmp_seq=1 ttl=62 time=1.33 ms

#/usr/local/nagios/libexec/check_vmware_api.pl -H 10.10.20.11 -f "/usr/local/nagiosxi/etc/components/vmware/myvmware01_auth.txt" -l #"CPU"
#Use of uninitialized value in concatenation (.) or string at /usr/local/nagios/libexec/check_vmware_api.pl line 957.
#CHECK_VMWARE_API.PL CRITICAL - Host "" does not exist

The strange here is that I have another host where it works perfectly.


#ping myvmware02
#PING myvmware02 (10.10.10.11) 56(84) bytes of data.
#64 bytes from myvmware02 (10.10.10.11): icmp_seq=1 ttl=64 time=1.04 ms


# /usr/local/nagios/libexec/check_vmware_api.pl -H myvmware02 -f "/usr/local/nagiosxi/etc/components/vmware/myvmware02 _auth.txt" -l "CPU"
CHECK_VMWARE_API.PL OK - cpu usage=16401.00 MHz (24.46%) | cpu_usagemhz=16401.00;; cpu_usage=24.46%;;
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: CHECK_VMWARE_API.PL CRITICAL - Host "" does not exist

Post by gormank »

Maybe try running on a host that doesn't exist and see what the error is?
Try logging into the nonworking host using the uname/passwd from the file?
You know it works on the one host, so it would seem to be an issue in myvmware01.
Finally, have a look at check_vmware_api.pl around line 957 and a bit above to see why you're seeing "uninitialized value in concatenation" at that point.
Post Reply