check_oracle_health

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.
Locked
nagiosjam
Posts: 81
Joined: Thu Feb 04, 2016 2:47 am

check_oracle_health

Post 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
oracle.jpg
Please help

Thanks !!!!
nagiosjam
Posts: 81
Joined: Thu Feb 04, 2016 2:47 am

Re: check_oracle_health

Post 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
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: check_oracle_health

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
nagiosjam
Posts: 81
Joined: Thu Feb 04, 2016 2:47 am

Re: check_oracle_health

Post 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:
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: check_oracle_health

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
nagiosjam
Posts: 81
Joined: Thu Feb 04, 2016 2:47 am

Re: check_oracle_health

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_oracle_health

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
nagiosjam
Posts: 81
Joined: Thu Feb 04, 2016 2:47 am

Re: check_oracle_health

Post by nagiosjam »

scottwilkerson wrote: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
Perfect !!!! Works
I have added --environment ORACLE_HOME = / u01 / oracle
Thank you very much for the help
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_oracle_health

Post by scottwilkerson »

nagiosjam wrote:
scottwilkerson wrote: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
Perfect !!!! Works
I have added --environment ORACLE_HOME = / u01 / oracle
Thank you very much for the help
Glad it is resolved!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked