Hello,
I've been scratching my head over this , i hope i'll find a suggestion here.
On the remote machine <nrpe_home>/libexec/check_oracle --db <SID> , shows database is up, But
<nrpe_home>/libexec/check_nrpe -H localhost -c check_oracle_<SID> , reports database is down.
In nrpe.cfg , the command is defined as:
commnd[check_oracle_<SID>]=/opt/nrpe/libexec/check_oracle --db <SID>
Any Ideas?
check_nrpe gives incorrect output
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe gives incorrect output
I'm not really familiar with this plugin but you need to make sure the ORACLE_HOME is set in the command as when nrpe runs the command it isn't going to get the users environment
Something like the following (changing to your correct paths):
Something like the following (changing to your correct paths):
Code: Select all
command[check_oracle_<SID>]=LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /opt/nrpe/libexec/check_oracle --db <SID>-
donny_rajvardhan
- Posts: 3
- Joined: Tue Mar 03, 2020 11:33 pm
Re: check_nrpe gives incorrect output
Tried this, still getting the same O/P.
Strange, that it reports "Database UP" for other SID's.
A total of 8 SID's are there, 2 of which are reported as DOWN by check_nrpe.
Though ORA_PMON_<SID> exists for each of these SID's.
Should i be using some other Nagios Plugin for Oracle DB monitoring? Any recommendations?
Strange, that it reports "Database UP" for other SID's.
A total of 8 SID's are there, 2 of which are reported as DOWN by check_nrpe.
Though ORA_PMON_<SID> exists for each of these SID's.
Should i be using some other Nagios Plugin for Oracle DB monitoring? Any recommendations?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: check_nrpe gives incorrect output
If it works outside of NRPE on that machine then it is a permission / sudoers issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
donny_rajvardhan
- Posts: 3
- Joined: Tue Mar 03, 2020 11:33 pm
Re: check_nrpe gives incorrect output
Okay, Got it working.
bash-3.2$ ./libexec/check_nrpe -H localhost -c print_env
_=/usr/bin/env
NRPE_PROGRAMVERSION=2.12
NRPE_MULTILINESUPPORT=1
PWD=/
TZ=IST-5:30
PATH was not set?
Had to set PATH along with command definition:
command[check_oracle_<SID>]=PATH=/usr/bin:<ORACLE_HOME>/bin /opt/nrpe/libexec/check_oracle --db <SID>
Strange that command definition without PATH for another SID works fine
command[check_oracle_<SID2>]=/opt/nrpe/libexec/check_oracle --db <SID2>
bash-3.2$ ./libexec/check_nrpe -H localhost -c print_env
_=/usr/bin/env
NRPE_PROGRAMVERSION=2.12
NRPE_MULTILINESUPPORT=1
PWD=/
TZ=IST-5:30
PATH was not set?
Had to set PATH along with command definition:
command[check_oracle_<SID>]=PATH=/usr/bin:<ORACLE_HOME>/bin /opt/nrpe/libexec/check_oracle --db <SID>
Strange that command definition without PATH for another SID works fine
command[check_oracle_<SID2>]=/opt/nrpe/libexec/check_oracle --db <SID2>
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe gives incorrect output
Glad to hear you got it working!donny_rajvardhan wrote:Okay, Got it working.
bash-3.2$ ./libexec/check_nrpe -H localhost -c print_env
_=/usr/bin/env
NRPE_PROGRAMVERSION=2.12
NRPE_MULTILINESUPPORT=1
PWD=/
TZ=IST-5:30
PATH was not set?
Had to set PATH along with command definition:
command[check_oracle_<SID>]=PATH=/usr/bin:<ORACLE_HOME>/bin /opt/nrpe/libexec/check_oracle --db <SID>
Strange that command definition without PATH for another SID works fine
command[check_oracle_<SID2>]=/opt/nrpe/libexec/check_oracle --db <SID2>
Locking thread