Page 1 of 1

Nagios - Oracle Plugin check_oracle

Posted: Mon Jan 16, 2017 5:26 am
by cooljsmb
Hello There,

On CLI , the command return OK status as shown below-

[nagios@HP4440-03 libexec]$ ./check_oracle --login ORCL
OK - dummy login connected
[nagios@HP4440-03 libexec]$ ./check_oracle --tns ORCL
OK - reply time 0 msec from ORCL

--------------------------------------------------------------------
On Web Interface, I am being shown following-

ORACLE-CHK-LOGIN
Notifications for this service have been disabled
UNKNOWN 01-16-2017 15:51:40 0d 0h 16m 8s 4/4 Cannot determine ORACLE_HOME for sid ORCL
ORACLE-CHK-TNS
Notifications for this service have been disabled
UNKNOWN 01-16-2017 15:52:05 0d 0h 16m 43s 4/4 Cannot determine ORACLE_HOME for sid ORCL

Any clues ?

Thanks
-Jas

Re: Nagios - Oracle Plugin check_oracle

Posted: Mon Jan 16, 2017 12:31 pm
by tgriep
It looks like when the Nagios process runs the plugin, it cannot find the path defined for the ORACLE_HOME and the LD_LIBRARY_PATH environment variables.
If you define the command like the example below, the Nagios process will should be able to find the required applications to run the check_oracle plugin and the plugin will function correctly

Code: Select all

/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client $USER1$/check_oracle $ARG1$
Adjust the paths in the command to your environment.