Page 1 of 1
check_oracle_health
Posted: Thu Oct 03, 2019 2:43 am
by nagiosjam
Good Morning.
I have check_oracle_health installed and when I execute a command from the console it responds to me ok.
/usr/lib64/nagios/plugins/check_oracle_health --connect BBDD--user XXX --password XXX --mode process-usage --warning 90 --critical 95
But on the nagios website I get an error and I am executing the same command
Please help
Thanks !!!!
Re: check_oracle_health
Posted: Thu Oct 03, 2019 2:58 am
by nagiosjam
Another test.
If I write the wrong password on the command line, it gives me a user error and password ... instead on the web if I enter the wrong password, instead of giving me the same password error error, I still get the CRITICAL error - cannot connect to BBDD. ORA-12154
Sorry for my bad English, I'm using the google translator
Re: check_oracle_health
Posted: Thu Oct 03, 2019 2:29 pm
by mbellerue
It looks like the nagios user may not have access to, or may not know where the tnsnames.ora file is.
At the command line, try this,
Code: Select all
su - nagios
/usr/lib64/nagios/plugins/check_oracle_health --connect BBDD--user XXX --password XXX --mode process-usage --warning 90 --critical 95
This will run the command as the nagios user. It will probably give us the same error.
Did you run through the installation instructions as shown on Consol Labs' website?
https://labs.consol.de/nagios/check_ora ... stallation
Re: check_oracle_health
Posted: Fri Oct 04, 2019 1:10 am
by nagiosjam
Using username "root".
Last login: Thu Oct 3 10:17:55 2019 from xxxx
[root@xxxx ~]# su - nagios
-bash-4.1$ /usr/lib64/nagios/plugins/check_oracle_health --connect bbdd --user xxxx --password xxxx --mode process-usage --warning 90 --critical 95
OK - 7.83% of process resources used | process_usage=7.83%;90;95
The problem is that with the user nagios I execute the command from the console and the result is ok, but on the web I get the error
CRITICAL - cannot connect to prsical. ORA-12154:
Re: check_oracle_health
Posted: Fri Oct 04, 2019 1:53 pm
by mbellerue
That is very strange. The only difference I can think of is that Apache gets involved. Can you check you /etc/group file to make sure that the nagios user is in the Apache group, and the Apache user is in the nagios group?
Re: check_oracle_health
Posted: Mon Oct 07, 2019 2:23 am
by nagiosjam
the nagios user and the apache user is in the apache group and in the nagios group.
It's the only check that doesn't work for me, the rest of the alerts work fine, and I have about 1,000
It may be failing because I have not installed the oracle client with the user nagios ?? oracle install client I installed it as root
Thank you
Re: check_oracle_health
Posted: Tue Oct 08, 2019 10:22 am
by scottwilkerson
My guess is that is cannot fin your environment, you may need to add something like the following to the command (replacing the path to your actual ORACLE_HOME)
Code: Select all
--environment ORACLE_HOME=/u01/oracle
https://labs.consol.de/nagios/check_ora ... index.html
Re: check_oracle_health
Posted: Wed Oct 09, 2019 3:02 am
by nagiosjam
Perfect !!!! Works
I have added --environment ORACLE_HOME = / u01 / oracle
Thank you very much for the help
Re: check_oracle_health
Posted: Wed Oct 09, 2019 10:26 am
by scottwilkerson
nagiosjam wrote:
Perfect !!!! Works
I have added --environment ORACLE_HOME = / u01 / oracle
Thank you very much for the help
Glad it is resolved!
Locking thread