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

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

Post by miracledisease »

As per requested, I have reentered the credentials to the credstore. When I run the check:

~/box293_check_vmware.pl --server 10.zzz.zzz.zzz --check vCenter_Name_Version (Enter)
Enter username: xxxxxxxxxxx
OK: VMware vCenter Server 5.5.0 build-xxxxxxxx
This is with my admin credentials.

If I use the read only user's (vmuser) credentials I am asked for a password also. The end result is the same. Should I be getting asked for credentials at this point after I have entered them into the credstore?
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 »

From the instructions in the manual, it shouldn't prompt for a username or password.
This is from page 27 of the manual.
Plugin prompts me for the username even though I added the user to the
credentials repository
This can happen when multiple entries exist for the same vCenter/ESX(i) server. The vMA appliance needs to
know what username you want to connect to the server as. To see a list of users in the credentials repository:
• SSH to the vMA appliance as vi-admin
• Type /usr/lib/vmware-vcli/apps/general/credstore_admin.pl list and press Enter
• You should see something like:
Server User Name
192.168.1.210 root
192.168.1.211 readonly
vcenter.box293.local readonly
vcenter.box293.local root
In this example you can see two entries for vcenter.box293.local.
To RESOLVE the issue simply remove the user from the credentials repository using the remove steps.
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 »

Removed all entries except the read only user. Can perform check within the vMA 10.xxx.xxx.xxx correctly without being prompted for credentials.

Performed the check with nagios (su nagios) and was able to get the results that I was expecting.

How do I get this check to show to correct result on the nagios web interface????
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 »

How do I get this check to show to correct result on the nagios web interface????
What do you see at the moment? Can you show us a screenshot? Also, post the service definition.
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 »

define service{
use local-service
host_name 10.zzz.zzz.zzz
service_description vCenter Version
check_command box293_check_vmware!$HOSTADDRESS$vCenter_Name_Version!
Initial_state u
max_check_attempts 3
check_interval 1440
retry_interval 7
active_checks_enabled 1
check_period 24x7
register 1
}

vCenter Version1 UNKNOWN 05-21-2015 15:58:13 0d 0h 5m 7s 3/3 UNKNOWN: 'vCenter_Name_Version10289$$$$$' is not a valid --check argument!
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 »

miracledisease wrote:check_command box293_check_vmware!$HOSTADDRESS$vCenter_Name_Version!
You are missing a !

It should be:

Code: Select all

check_command box293_check_vmware!$HOSTADDRESS$!vCenter_Name_Version
Also, the reason why you were getting prompted on vMA before was because you had multiple credentials defined for the one server. Thats why it worked once you removed them all and added just one.
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 »

That was a typo on my part. the check command is as follows:

check_command box293_check_vmware!$HOSTADDRESS$!vCenter_Name_Version!
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 »

Could you post how the check command is defined in the commands.cfg file?
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 »

define command{
command_name box293_check_vmware
command_line $USER1$/check_by_ssh -E 1 -t 90 -l vi-admin -H 10.xxx.xxx.xxx -C "nice -n19 ~/box293_check_vmware.pl --server $ARG1$ --check $ARG2$\"$ARG3$\"\"$ARG$$\"\"$ARG5$\"\"$ARG6$\"\"$ARG7$\"\"$ARG8$\""
}
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 »

Try running the check from a shell prompt to see if you get the same results. Post the results from this command.

Code: Select all

/usr/local/nagios/libexec/check_by_ssh -E 1 -t 90 -l vi-admin -H 10.xxx.xxx.xxx -C "~/box293_check_vmware.pl --server 10.zzz.zzz.zzz --check vCenter_Name_Version"
Have you tried any other checks for your system?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked