box293_check_vmware.pl plugin timed out Nagios Core 3.4.1

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
miracledisease
Posts: 13
Joined: Wed Sep 10, 2014 9:11 am

box293_check_vmware.pl plugin timed out Nagios Core 3.4.1

Post 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.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

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

Post by jolson »

Could you please post a sanitized version of the command you're running from your nagios box?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
miracledisease
Posts: 13
Joined: Wed Sep 10, 2014 9:11 am

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

Post 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
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

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

Post 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?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
miracledisease
Posts: 13
Joined: Wed Sep 10, 2014 9:11 am

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

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
miracledisease
Posts: 13
Joined: Wed Sep 10, 2014 9:11 am

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

Post 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?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
miracledisease
Posts: 13
Joined: Wed Sep 10, 2014 9:11 am

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

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked