I have used the oracle xi wizards to configure service checks for a database. I The service uses the check_oracle_health plugin.
Using it to run a sql query as a service returns successfully; however other uses of this fail & give up a "(Return code of 126 is out of bounds - plugin may not be executable)".
The plugin is executable and runs correctly on the command line for those services which fail in nagios.
Any ideas what's going on?
check_oracle_health - (Return code of 126 is out of bounds)
-
mezawadzki
- Posts: 2
- Joined: Wed Mar 13, 2013 1:38 pm
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_oracle_health - (Return code of 126 is out of boun
Can you show us how the command is defined in the Nagios XI interface? And the definition for the service you have created through the Core Config Manager as well? You can either copy this information from the following files:
And:
Or you can open them in the Core Config Manager and send us a screenshot, of course blank out any information you wish not to share such as passwords or external facing IP's.
Also, please send us a copy of the working service and command definition as well so we can compare, thank you!
Code: Select all
/usr/local/nagios/etc/commands.cfgCode: Select all
/usr/local/nagios/etc/services/<servicename.cfg>Also, please send us a copy of the working service and command definition as well so we can compare, thank you!
-
mezawadzki
- Posts: 2
- Joined: Wed Mar 13, 2013 1:38 pm
Re: check_oracle_health - (Return code of 126 is out of boun
Commands :
# works!
define command {
command_name check_xi_oraclequery
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health $ARG1$
}
# does not work
define command {
command_name check_xi_oracleserverspace
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64 /lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health $ARG1$
}
#this service works
define service {
host_name docdata.benderson.com
service_description Oracle Query - Test Query
use xiwizard_oraclequery_service
check_command check_xi_oraclequery! -connect nagiosadmin/xxxxx@xxxxxx --mode sql --name="select count(*) from v\\\$session where status = 'active'" --warning 50 --critical 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
first_notification_delay 0
notification_period xi_timeperiod_24x7
notification_options w,u,c,r,f,s
notifications_enabled 1
contacts nagiosadmin
_xiwizard oraclequery
register 1
}
define service {
host_name docdata.benderson.com
service_description benducm Connected Users
use xiwizard_oracleserverspace_service
check_command check_xi_oracleserverspace! --connect nagiosadmin/XXXXX@XXXXX--mode connected-users --warning 50 --critical 100
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
first_notification_delay 0
notification_period xi_timeperiod_24x7
notification_options w,u,c,r,f,s
notifications_enabled 1
contacts nagiosadmin
_xiwizard oracleserverspace
register 1
}
# works!
define command {
command_name check_xi_oraclequery
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health $ARG1$
}
# does not work
define command {
command_name check_xi_oracleserverspace
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64 /lib ORACLE_HOME=/usr/lib/oracle/11.2/client64 $USER1$/check_oracle_health $ARG1$
}
#this service works
define service {
host_name docdata.benderson.com
service_description Oracle Query - Test Query
use xiwizard_oraclequery_service
check_command check_xi_oraclequery! -connect nagiosadmin/xxxxx@xxxxxx --mode sql --name="select count(*) from v\\\$session where status = 'active'" --warning 50 --critical 200
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
first_notification_delay 0
notification_period xi_timeperiod_24x7
notification_options w,u,c,r,f,s
notifications_enabled 1
contacts nagiosadmin
_xiwizard oraclequery
register 1
}
define service {
host_name docdata.benderson.com
service_description benducm Connected Users
use xiwizard_oracleserverspace_service
check_command check_xi_oracleserverspace! --connect nagiosadmin/XXXXX@XXXXX--mode connected-users --warning 50 --critical 100
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
first_notification_delay 0
notification_period xi_timeperiod_24x7
notification_options w,u,c,r,f,s
notifications_enabled 1
contacts nagiosadmin
_xiwizard oracleserverspace
register 1
}
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_oracle_health - (Return code of 126 is out of boun
In the second command definition:
Be sure you add a space at this point, between the XXXX'd out area, and the --mode flag:
Can you show how you are running this from the command line? As an example:
Code: Select all
check_command check_xi_oracleserverspace! --connect nagiosadmin/XXXXX@XXXXX--mode connected-users --warning 50 --critical 100Code: Select all
nagiosadmin/XXXXX@XXXXX --modeCode: Select all
/usr/local/nagios/libexec/check_oracle_health -connect "ipaddress:port/service_name" --username XXXXX --password "XXXXX" --mode connected-users --warning 50 --critical 100
Last edited by slansing on Wed Mar 13, 2013 2:42 pm, edited 3 times in total.
Reason: code wraps.
Reason: code wraps.
Re: check_oracle_health - (Return code of 126 is out of boun
EDIT: We need to back up here. Are you using the "check_oracle_health" plugin from the oracle wizard, or the one from consol-labs?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.