check_esx did not exit properly!
Posted: Thu Dec 03, 2015 9:19 am
I used this script from nagios exchange https://exchange.nagios.org/directory/P ... st/details for many years in nagios2. now on a new server with debian 7 and nagios3 the plugin doesn't exit properly and i can't find the problem. the script is running perfectly in cli started a user root and as user nagios too.
Nagios Log and Debug output:
when i copy & paste the Final output from Debug log to cli it's running.
here my config.
after i figured out a problem with $ARGn$ parameters with another script in nagios3 i tried to use the same syntax in service definition which fixes the other problem but without luck:
here you have to give a ! for every $ARG$ in command definition but as i sayed it didn't work.
Code: Select all
nagios@srvnag:~$ /usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password -l cpu
CHECK_ESX.PL OK - cpu usage=5546.00 MHz (34.66%) | cpu_usagemhz=5546.00Mhz;; cpu_usage=34.66%;;Code: Select all
[1449151076] Warning: Check of service 'Check ESX CPU' on host 'SERVERNAME' did not exit properly!
[1449151101.175320] [2048.2] [pid=31249] Uncleaned macro. Running output (63): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname'
[1449151101.175329] [2048.2] [pid=31249] Just finished macro. Running output (63): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname'
[1449151101.175349] [2048.2] [pid=31249] Not currently in macro. Running output (91): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password '
[1449151101.175409] [2048.2] [pid=31249] Uncleaned macro. Running output (91): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password '
[1449151101.175417] [2048.2] [pid=31249] Just finished macro. Running output (91): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password '
[1449151101.175442] [2048.2] [pid=31249] Not currently in macro. Running output (92): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password '
[1449151101.175491] [2048.2] [pid=31249] Uncleaned macro. Running output (98): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password -l cpu'
[1449151101.175506] [2048.2] [pid=31249] Just finished macro. Running output (98): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password -l cpu'
[1449151101.175522] [2048.2] [pid=31249] Not currently in macro. Running output (98): '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password -l cpu'
[1449151101.175540] [2048.1] [pid=31249] Done. Final output: '/usr/lib/nagios/plugins/check_esx.pl -H servername.domainname -u username -p password -l cpu'here my config.
Code: Select all
define command{
command_name check_esx
command_line $USER1$/check_esx.pl -H $HOSTADDRESS$ -u username -p password $ARG1$ $ARG2$
}
Code: Select all
define service{
use generic-service
hostgroup esx-servers
service_description Check ESX CPU
check_command check_esx!-l cpu
}Code: Select all
define service{
use generic-service
hostgroup esx-servers
service_description Check ESX CPU
check_command check_esx!!-l cpu
}