Page 1 of 3

box293_check_vmware.pl plugin timed out Nagios Core 3.4.1

Posted: Wed May 20, 2015 2:56 pm
by miracledisease
I have been trying to get the box293_check_vmware.pl plugin to work for about a week now. I have followed the manual instructions and still cannot seem to get the check to work from Nagios to the vMA. All checks work form vMA. From Nagios I get plugin in timed out.... I have adjusted timeout arguments with no luck. Need help getting the check working please. Thank you in advance for your help.

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Wed May 20, 2015 3:28 pm
by jolson
Could you please post a sanitized version of the command you're running from your nagios box?

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Wed May 20, 2015 3:37 pm
by miracledisease
/usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 192.168.xxx.xxx -C "~/box293_check_vmware.pl --server 192.168.xxx.xxx --check vCenter_Name_Version"

Plugin timed out after 10 seconds.

The Nagios web interface output is Enter username error:: Invalid argument specified

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Wed May 20, 2015 3:51 pm
by jolson
/usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 192.168.xxx.xxx -C "~/box293_check_vmware.pl --server 192.168.xxx.xxx --check vCenter_Name_Version"
If you log into your vCenter server manually via SSH, are you able to submit the command that you're trying to call?

Code: Select all

ssh [email protected]
./box293_check_vmware.pl --check vCenter_Name_Version
The developer of this plugin will be online soon, and I'm sure he'll have some more comprehensive steps to take. In the meantime, is there any problem with the above?

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Wed May 20, 2015 4:01 pm
by miracledisease
The box293_check is place on the vSphere Management Assistant (vMA). When I ssh to it I can run the checks against the vCenter Server and the checks return the proper information. I am having problems getting the Nagios server talk to the vMA server.

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Wed May 20, 2015 4:12 pm
by lmiltchev
username error:: Invalid argument specified
It seems like you are having issues with the credentials. Can you ssh successfully into the remote machine without being asked for a password? Did you follow Box293's manual?

https://exchange.nagios.org/directory/P ... re/details

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Wed May 20, 2015 4:15 pm
by miracledisease
Yes I followed the manual.I set the ssh credentials and can ssh the first time without being asked for credentials. When I run the check from Nagios I am asked for a password. How do I get the credentials to stick?

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Wed May 20, 2015 7:27 pm
by Box293
Hey that looks like something I can help with :D
miracledisease wrote:All checks work form vMA.
miracledisease wrote:/usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 192.168.xxx.xxx -C "~/box293_check_vmware.pl --server 192.168.xxx.xxx --check vCenter_Name_Version"

Plugin timed out after 10 seconds.

The Nagios web interface output is Enter username error:: Invalid argument specified
Can you please post the vCenter_Name_Version check you are running on the vMA which works (the full command typed and the output).

I suspect this is IP Address / DNS / Case sensitive related.

In the steps below,
10.XXX.XXX.XXX = vMA host
10.ZZZ.ZZZ.ZZZ = vCenter server

Try these commands and post back the results please:
The following commands will be done as the nagios user

Code: Select all

su nagios
Does this command prompt you for credentials?
If you do login or are not prompted for credentials, type exit so end the SSH session and return to the nagios host.

Does this command prompt you for credentials, what is the output?

Code: Select all

/usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 10.XXX.XXX.XXX -C '~/box293_check_vmware.pl --server 10.ZZZ.ZZZ.ZZZ --version'
We'll stop being the nagios user now, type exit

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Thu May 21, 2015 8:14 am
by miracledisease
As the Nagios user, when I ssh to the vMA, I am not asked for credentials.

vi-admin@VMA:~> ./box293_check_vmware.pl --server 10.zzz.zzz.zzz --check vCenter_Name_Version
Enter username:
Enter password:
OK: VMware vCenter Server 5.5.0 build-xxxxxxxx

Back as the Nagios user (su nagios) entering the command:
[nagios@nagios root]$ /usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 10.xxx.xxx.xxx -C '~/box293_check_vmware.pl --server 10.zzz.zzz.zzz --version'
box293_check_vmware Version: 2014-08-24

Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.

Posted: Thu May 21, 2015 1:28 pm
by tgriep
It looks like the vMA credentials didn't get setup. Below is from page 10 of the manual. Try going through it again and see in that fixes it for you.
Configure vMA credentials for connecting to vCenter Server(s) / ESX(i) host(s)
▪ The following steps use the vMA credentials repository for storing the user account credentials for accessing your vCenter Server(s) / ESX(i) host(s)
▪ A full explanation of why you are doing this is in the "Credentials Overview" section of this manual
• vCenter Server Credentials
◦ In these steps:
▪ I have a vCenter server using the IP Address 192.168.1.211
▪ I have configured a user account called readonly which has been granted the Readonly role and permissions assigned in the vCenter hierarchy (it has the password: A V3ry Str0ng P@ssw0rd)
◦ Type /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add --server 192.168.1.211 --username readonly --password "A V3ry Str0ng P@ssw0rd" and press Enter
◦ You will be presented with > New entry added successfully
◦ You can now perform a simple test with the plugin to ensure all is working OK
◦ Type ~/box293_check_vmware.pl --server 192.168.1.211 --check vCenter_Name_Version and press Enter
◦ If the credentials were correct then you will get the response along the lines of
▪ OK: VMware vCenter Server 5.1.0 build-1123961