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
Oracle health check error
Re: Oracle health check error
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.
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
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-usagehttps://labs.consol.de/nagios/check_ora ... index.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
nagiosEngie
- Posts: 104
- Joined: Thu May 03, 2018 7:57 am
Re: Oracle health check error
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
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
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
nagiosEngie
- Posts: 104
- Joined: Thu May 03, 2018 7:57 am
Re: Oracle health check error
Checked the grants on the user.
That solved the problem.
Thanks
Cheers
SAndro
That solved the problem.
Thanks
Cheers
SAndro
Re: Oracle health check error
Glad to hear it! Did you have further (related) questions or are we good to lock this up?
Former Nagios employee
-
nagiosEngie
- Posts: 104
- Joined: Thu May 03, 2018 7:57 am
Re: Oracle health check error
Hello,
yes lock it up.
Thanks
Sandro
yes lock it up.
Thanks
Sandro