Return code of 126 is out of bounds error for plugin
Posted: Thu Dec 18, 2014 4:20 am
I have created a plugin called "check_oracle_login" and symlinked it to the folder with the build in plugins with the same owner and the same permissions:
I have the created this command:
And this service:
When I check the config files with everything seems ok
but when the check is performed I get this error in the front end: (Return code of 126 is out of bounds - plugin may not be executable)
Im running Centos 6.6, and Nagios Core 3.5.1
Any pointers or help appreciated.
Code: Select all
#!/usr/bin/env php
<?php
$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521)))(CONNECT_DATA=(SERVICE_NAME=name)))";
$conn = OCILogon ( 'user', 'pass', $db );
if (! $conn) {
exit(2);
}
exit(0);
Code: Select all
define command{
command_name check_oracle_login
command_line $USER1$/check_oracle_login
}
Code: Select all
define service {
use generic-service
host_name localhost
service_description Check valid login
check_command check_oracle_login
contacts nagiosadmin
contact_groups admins
}
Code: Select all
nagios -v /etc/nagios/nagios.cfgbut when the check is performed I get this error in the front end: (Return code of 126 is out of bounds - plugin may not be executable)
Im running Centos 6.6, and Nagios Core 3.5.1
Any pointers or help appreciated.