Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
AnotherNagiosUser
Posts: 19 Joined: Tue Feb 26, 2019 4:51 am
Post
by AnotherNagiosUser » Mon Apr 01, 2019 3:09 am
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.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Mon Apr 01, 2019 2:22 pm
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
AnotherNagiosUser
Posts: 19 Joined: Tue Feb 26, 2019 4:51 am
Post
by AnotherNagiosUser » Tue Apr 02, 2019 2:03 am
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 (
nagios@nagios.org )
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...>]
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Apr 02, 2019 6:59 am
Can you show what you have configured as your check_nrpe command on the nagios server?
AnotherNagiosUser
Posts: 19 Joined: Tue Feb 26, 2019 4:51 am
Post
by AnotherNagiosUser » Wed Apr 03, 2019 3:13 am
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
}
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Wed Apr 03, 2019 7:34 am
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
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Fri Apr 05, 2019 7:45 am
AnotherNagiosUser wrote: Thanks, adding the -a worked!
Excellent!
Locking thread