Page 1 of 1
check_oracle
Posted: Mon Apr 01, 2019 3:09 am
by AnotherNagiosUser
I'm having trouble with the check_oracle plugin now. This is how it's set up at the moment.
nrpe.cfg
Code: Select all
command[check_oracle]=/usr/local/nagios/libexec/check_oracle $ARG1$
Code: Select all
define service {
use generic-service
host_name db1-serv
service_description database1
check_command check_nrpe!check_oracle! '--db database1'
I get this error on nagios
(No output returned from plugin)
I think I need to specify the path to oracle in nrpe?
Code: Select all
LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client
Not sure how I do this , or maybe i need to be doing this in the service bit.
The nagios user on the database server has the oracle enviromental settings in bash_profile.
Re: check_oracle
Posted: Mon Apr 01, 2019 2:22 pm
by scottwilkerson
Change this
Code: Select all
command[check_oracle]=/usr/local/nagios/libexec/check_oracle $ARG1$
to this
Code: Select all
command[check_oracle]=/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle $ARG1$
then restart NRPE
Re: check_oracle
Posted: Tue Apr 02, 2019 2:03 am
by AnotherNagiosUser
scottwilkerson wrote:Change this
Code: Select all
command[check_oracle]=/usr/local/nagios/libexec/check_oracle $ARG1$
to this
Code: Select all
command[check_oracle]=/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle $ARG1$
then restart NRPE
I'm still getting this message
(No output returned from plugin)
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (
[email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]
Re: check_oracle
Posted: Tue Apr 02, 2019 6:59 am
by scottwilkerson
Can you show what you have configured as your check_nrpe command on the nagios server?
Re: check_oracle
Posted: Wed Apr 03, 2019 3:13 am
by AnotherNagiosUser
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
}
Re: check_oracle
Posted: Wed Apr 03, 2019 7:34 am
by scottwilkerson
So, the $ARG2$ in you service description is going to need the -a flag in it to pass the arguments, something like this
Code: Select all
define service {
use generic-service
host_name db1-serv
service_description database1
check_command check_nrpe!check_oracle! -a ' --db database1'
I'm not sure what the full command you are trying to send is, but the argumnts you want to send would go in the quotes after the
-a flag
Re: check_oracle
Posted: Fri Apr 05, 2019 6:25 am
by AnotherNagiosUser
Thanks, adding the -a worked!

Re: check_oracle
Posted: Fri Apr 05, 2019 7:45 am
by scottwilkerson
AnotherNagiosUser wrote:Thanks, adding the -a worked!

Excellent!
Locking thread