When I run the command as a nagios user (su nagios) the results are as expected. When I run the commands from root it asked for the root password for the vMA. I a trying to achieve a correct configuration so that Nagios' web interface displays the results. Nagios displays
UNKNOWN: 'Host_OS_Name_Version10124$$$$$' is not a valid --check argument!
command.cfg:
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$\""
}
Linux.cfg:
define service{
use local-service
host_name 10.zzz.zzz.zzz
service_description vCenter Version1
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
}
Check command: as nagios user (su nagios)- checks work this way, as root user they do not......
/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 --check vCenter_Name_Version"
box293_check_vmware.pl plugin timed out Nagios Core 3.4.1
-
- Posts: 13
- Joined: Wed Sep 10, 2014 9:11 am
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Could you edit the service check and hard code the IP address in it for a test?
Change this from
to
Also, could you run the command as nagios from the command line and post the output here?
I would like to see if there are and illegal characters in it.
Change this from
Code: Select all
check_command box293_check_vmware!$HOSTADDRESS$!vCenter_Name_Version!!!!!!
Code: Select all
check_command box293_check_vmware!10.zzz.zzz.zzz!vCenter_Name_Version!!!!!!
I would like to see if there are and illegal characters in it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 13
- Joined: Wed Sep 10, 2014 9:11 am
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
[nagios@nagios objects]$ /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 --check vCenter_Name_Version"
OK: VMware vCenter Server 5.5.0 build-xxxxxx
Nagios web interface output ----- after changing $HOSTADDRESS$ to 10.zzz.zzz.zzz
UNKNOWN: 'vCenter_Name_Version3337$$$$$' is not a valid --check argument!
OK: VMware vCenter Server 5.5.0 build-xxxxxx
Nagios web interface output ----- after changing $HOSTADDRESS$ to 10.zzz.zzz.zzz
UNKNOWN: 'vCenter_Name_Version3337$$$$$' is not a valid --check argument!
- 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.
All of these arguments need a space separating them AND what *should* be $ARG4$ is currently $ARG$$, these are both contributing to your issues. Here is what it should be::miracledisease wrote:command.cfg:
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$\""
}
Code: Select all
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$\" \"$ARG4$\" \"$ARG5$\" \"$ARG6$\" \"$ARG7$\" \"$ARG8$\""
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 13
- Joined: Wed Sep 10, 2014 9:11 am
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
Thank you guys for all your help. The check is finally producing desired results on the web interface. Now it is time to get more checks running. Again thank you to all the Nagios champs that helped out.
Re: box293_check_vmware.pl plugin timed out Nagios Core 3.4.
I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee