Page 1 of 1

perl plugins with core4

Posted: Sun Feb 16, 2014 10:54 pm
by m.saad
im working with mysql_health_check now and it's working fine from command and when i've but when add it to config it does not
and shows error
Critical "Return code of 13 is out of bounds") is this related to enable_embedded_perl removal from core4

and i test this plugin with core3 and it's working fine with the same configuration

Re: perl plugins with core4

Posted: Mon Feb 17, 2014 12:02 pm
by abrist
Yes, the internal perl implementation was removed in core 4, and yes, it is most likely the cause of your issue. You will need to make sure perl is installed on the host in question, and you will need to add "/usr/bin/perl" to the beginning of the check's command line. For example:

Code: Select all

define command {
       command_name                             fancy_perl_plugin_check
       command_line                             /usr/bin/perl $USER1$/fancypants_plugin.pl
}
You can discover which path to perl to use with:

Code: Select all

which perl

Re: perl plugins with core4

Posted: Mon Feb 17, 2014 1:28 pm
by m.saad
thanks but the problem still the same
Feb 17 13:22:00 Nagios nagios: Warning: Return code of 13 for check of service 'mysql uptime' on host 'server.XXX.com' was out of bounds.

and i've tested the plugin with core3 and it's working fine with the same command line configuration
and also i've tested it to run command throught nrpe and it's woring fine

but the problem still the same with core4

Re: perl plugins with core4

Posted: Mon Feb 17, 2014 2:17 pm
by abrist
It could also be a permissions issue. what are the permissions on the plugin? Can you run the check from the cli as user "nagios"?

Re: perl plugins with core4

Posted: Mon Feb 17, 2014 2:39 pm
by m.saad
it's ok when i run the command from the command line as nagios user

[nagios@Nagios libexec]$ /usr/bin/perl mysql_health_check.pl -H localhost -u XXXX -p XXXX -m varcomp --expression='Threads_connected/max_connections * 100' --comparison='>80'
mysql_varcomp OK - Comparison check passed: (Threads_connected/max_connections * 100) >80 = 0.66

Re: perl plugins with core4

Posted: Tue Feb 18, 2014 10:23 am
by abrist
Can you post the full command and service check definitions?