Page 1 of 1
Oracle health check error
Posted: Wed Jun 27, 2018 5:31 am
by nagiosEngie
Hello Nagios Crew,
I am having an issue with the oracle check check_oracle_health.
If I try to retrieve the tablespace usage it will return this error message:
[...]
[adm-nagios@einagxiitmi01ts libexec]$ ./check_oracle_health --connect 'x.x.x.x:1521/SBX' --username 'username' --password 'password' --mode tablespace-usage
bumm Can't call method "execute" on an undefined value at ./check_oracle_health line 4891.
Can't use an undefined value as an ARRAY reference at ./check_oracle_health line 4905.
[...]
Can you please support me for this issue?
Thanks
SAndro
Re: Oracle health check error
Posted: Wed Jun 27, 2018 1:49 pm
by tgriep
The oracle health plugin requires the Oracle Instant Client installed on the server so it it is not, you need to install it by following these instructions.
https://assets.nagios.com/downloads/nag ... lation.pdf
And, when running the plugin, you should run the command with the ORACLE_HOME and the LD_LIBRARY_PATH environment like the example below. Adjust the path as necessary.
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib ORACLE_HOME=/usr/lib/oracle/11.2/client /usr/local/nagios/libexec/check_oracle_health --connect='x.x.x.x:1521/SBX --username=nagios --password=nagios --mode=tablespace-usage
Also, make sure you are running the latest version of the plugin which you can get here and look at the section "Preparation of the database" for setting up the user permissions on the Oracle Database.
https://labs.consol.de/nagios/check_ora ... index.html
Re: Oracle health check error
Posted: Thu Jun 28, 2018 3:25 am
by nagiosEngie
Hello,
all the configuration steps have been done.
If I run the command with different --mode options it will give me the right output.
If I try to run the command with any --mode that involves tablespaces it fails with the error I described.
Example:
Output SBX Connected Users:
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib ORACLE_HOME=/usr/lib/oracle/12.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'x.x.x.x:1521/SBX' --username 'user01' --password 'password' --mode connected-users --warning 50 --critical 100
OK - 1 connected users | connected_users=1;50;100
If I try the the Free table space:
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib ORACLE_HOME=/usr/lib/oracle/12.2/client64 /usr/local/nagios/libexec/check_oracle_health --connect 'x.x.x.x:1521/SBX' --username 'user01' --password 'password' --mode tablespace-free --warning 5: --critical 2:
bumm Can't call method "execute" on an undefined value at /usr/local/nagios/libexec/check_oracle_health line 4891.
Can't use an undefined value as an ARRAY reference at /usr/local/nagios/libexec/check_oracle_health line 4905.
It looks like there is a problem in retrieving the tablespace information.
Thanks
Sandro
Re: Oracle health check error
Posted: Thu Jun 28, 2018 10:16 am
by tgriep
Make sure you are running the latest version of the plugin and if you are, I would verify that the Oracle user account has sufficient rights to gather that data.
Re: Oracle health check error
Posted: Fri Jul 06, 2018 7:15 am
by nagiosEngie
Checked the grants on the user.
That solved the problem.
Thanks
Cheers
SAndro
Re: Oracle health check error
Posted: Fri Jul 06, 2018 9:14 am
by tmcdonald
Glad to hear it! Did you have further (related) questions or are we good to lock this up?
Re: Oracle health check error
Posted: Mon Jul 09, 2018 2:26 am
by nagiosEngie
Hello,
yes lock it up.
Thanks
Sandro