Page 2 of 3
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Thu May 21, 2015 1:44 pm
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?
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Thu May 21, 2015 2:59 pm
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.
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Thu May 21, 2015 3:18 pm
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????
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Thu May 21, 2015 4:26 pm
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.
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Thu May 21, 2015 4:35 pm
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!
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Thu May 21, 2015 4:44 pm
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.
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Fri May 22, 2015 8:01 am
by miracledisease
That was a typo on my part. the check command is as follows:
check_command box293_check_vmware!$HOSTADDRESS$!vCenter_Name_Version!
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Fri May 22, 2015 9:38 am
by tgriep
Could you post how the check command is defined in the commands.cfg file?
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Fri May 22, 2015 9:48 am
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$\""
}
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Posted: Fri May 22, 2015 11:58 am
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?