check_oracle_health
Posted: Thu Aug 02, 2018 9:19 am
Hi I am building a new centos 7 server. I have installed Nagios core 4.4.1 and ran through the varios DBD::Oracle DBI installs via cpan etc.
I am abe to get check_oracle_health to work at a command line via the nagios user; however, when ran through Nagios it errors.
Via nagios core though, It errors with
This seems like it's a common topic when searching around the net and the forum here but I am not making any headway on what the issue is. It feels like it's just a en enviroment path issue when envoked via noninteractive shell or something. Has anyone elese experienced a similar issue with this and willing to help point me in the right direction?
instantclient base, sqlplus, sdk was installed.
I have this set in my /etc/profile.d/sh.loal,
cat /etc/profile.d/sh.local
I am abe to get check_oracle_health to work at a command line via the nagios user; however, when ran through Nagios it errors.
Code: Select all
check_oracle_health -t 30 --connect ORADB1 --user myuser --password mypass --mode connection-time --warning 15 --critical 25
OK - 0.38 seconds to connect as myuser | connection_time=0.3807;15;25Code: Select all
CRITICAL - cannot connect to ORADB1. install_driver(Oracle) failed: Can't locate loadable object for module DBD::Oracle in @INC (@INC contains: /usr/local/nagios/libexec /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 13) line 3.instantclient base, sqlplus, sdk was installed.
I have this set in my /etc/profile.d/sh.loal,
cat /etc/profile.d/sh.local
Code: Select all
#Add any required envvar overrides to this file, it is sourced from /etc/profile
export LD_LIBRARY_PATH=/opt/oracle/instantclient_18_3
export ORACLE_HOME=/opt/oracle/instantclient_18_3
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=/opt/oracle/instantclient_18_3:$PATH