Page 2 of 4
Re: Prerequisites for check_oracle_health plugins
Posted: Wed Sep 05, 2018 10:08 am
by tgriep
One cause for that error is a permission issue.
If the nagios user or the nagios group cannot access the files and folders where the Oracle Instant Client is installed at, it could cause that error.
Go to these folders and verify that the permissions are set for the nagios user to access / read them.
Code: Select all
/usr/lib/oracle/18.3/client64/lib
/usr/lib/oracle/18.3/client64
You may also want to go to the following link and download the latest check_oracle_health plugin and see if that fixes the issue.
https://labs.consol.de/nagios/check_ora ... l#download
Re: Prerequisites for check_oracle_health plugins
Posted: Sat Sep 08, 2018 4:28 pm
by rtsupport
Hi,
Permission on suggested dir are fine, and just to update you after updating .bash_profile for nagios using using below commands plugin is working fine now. we are able to execute it now.
export ORACLE_HOME=/usr/lib/oracle/18.3/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib
Now, could please help me with URL from where we can download latest gearmand server.
Re: Prerequisites for check_oracle_health plugins
Posted: Mon Sep 10, 2018 8:58 am
by tgriep
That is good news that the plugin is working for you.
The link below is the instructions for Integrating Mod-Gearman With Nagios XI.
https://assets.nagios.com/downloads/nag ... ios_XI.pdf
It has the link to the version of Mod Gearman that is known to work with Nagios XI.
Re: Prerequisites for check_oracle_health plugins
Posted: Tue Oct 16, 2018 6:49 am
by rtsupport
Hi Team,
Sorry for delay in response, was stuck on other task..
continuing on this Post..
-> we are able to execute the check_oracle_health plugin from CMD and getting tns,login,tablespace result but when we setup alert in GUI we are getting below error.
CRITICAL - cannot connect to 00.00.00.00:1528/T12ARG. install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.18.1: cannot open shared object file: No such file or directory at /usr/
at (eval 14) line 3.
Compilation failed in require at (eval 14) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/nagios/libexec/check_oracle_health line 6151.
As per below doc. have set valuable and export the variables for nagios user on both worker server and Nagios server.
export ORACLE_HOME=/usr/lib/oracle/18.3/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Just to Note : on CMD command result are working fine with nagios user but when we trying with root user getting same error mentioned above. and after exporting below path on root profile. CMD result is fine but still GUI throwing same error. Also if we are exit from root and again establish the session we have to export variable every time to make it work.
export ORACLE_HOME=/usr/lib/oracle/18.3/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib
Re: Prerequisites for check_oracle_health plugins
Posted: Tue Oct 16, 2018 9:11 am
by tgriep
In the command that is defined in Nagios XI, it should have the environment variables set when it is ran so you don't have to worry about settings them in the shell.
Can you verify that the commands are setup to point to the correct folders for the ORACLE_HOME and the LD_LIBRARY_PATH environment variable?
Re: Prerequisites for check_oracle_health plugins
Posted: Tue Oct 16, 2018 9:18 am
by rtsupport
yeh, folder location is correct, however can you let me know how i can verify and which command i have to run to apply all these changes.
[nagios@usa0***** client64]$ pwd
/usr/lib/oracle/18.3/client64
[nagios@usa0300l*** client64]$ ll
total 4
drwxr-xr-x 2 root root 48 Oct 12 00:26 bin
drwxr-xr-x 3 root root 4096 Oct 12 00:27 lib
Re: Prerequisites for check_oracle_health plugins
Posted: Tue Oct 16, 2018 12:40 pm
by tgriep
The commands in the Core Config Manager > Commands menu are called
Code: Select all
check_xi_oraclequery
check_xi_oracleserverspace
check_xi_oracletablespace
and in your environment, the command line should be as follows.
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib ORACLE_HOME=/usr/lib/oracle/18.3/client64 $USER1$/check_oracle_health $ARG1$
Save the changes and apply the config.
Doing this will set the environment when the check is ran and you don't have to worry about setting the variables in the shell.
Re: Prerequisites for check_oracle_health plugins
Posted: Wed Oct 17, 2018 9:39 am
by rtsupport
Command updated, in Nagios GUI. but still same error. Have attached error screen shot for more info.
Also today i noticed that we are unable to do force check on any server and services, or unable to disable the notification using Nagios GUI.
-- On Nagios server / worker server.
unable to run ./check_oracle_health plugin when new cmd session start for any user (Local, Nagios, Root) and after exporting below commands on shell it start working still on CMD not in GUI.
export ORACLE_HOME=/usr/lib/oracle/18.3/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib
Also just to Add on Nagios and worker server to run any command for nagios we have to use sudo.
Re: Prerequisites for check_oracle_health plugins
Posted: Wed Oct 17, 2018 12:10 pm
by tgriep
If the Gearman Worker is running as the Nagios user and you need to sudo to run any command, that is the issue.
Another thing, if you have to run sudo for the command and it prompts for a password, that will make it fail as well.
You would have to change the commands in XI and add the sudo command to the begining of the command line and you also need to edit the /etc/sudoers file on the workers and add the following.
If it still fails, check the Gearman Worker log file for any errors.
They are usually located in this folder.
Re: Prerequisites for check_oracle_health plugins
Posted: Thu Oct 18, 2018 3:12 pm
by rtsupport
nagios ALL=NOPASSWD: ALL --> updated to sudoers files but still unable to run any command without sudo. Please advise as i am not expert in linux.
Also to fix force intimidate check and disable notification issue from GUI, i followed below URL and found the /usr/local/nagios/var/rw/nagios.cmd was not available, and followed same post which fix the issue and nagios.cmd is there now with correct permission. But after restarting nagios service Nagios login page is down and now getting "HTTP ERROR 500" error. and found that nagios and ndo2db services are not running. however when starting them its giving an output as started but in status its showing its not running.
https://support.nagios.com/forum/viewto ... =7&t=27662
Code: Select all
[nagios@usa0300lv1126 ~]$ sudo service ndo2db status
ndo2db is not running but subsystem locked
[nagios@usa0300lv1126 ~]$ sudo service nagios status
nagios is not running
[nagios@usa0300lv1126 ~]$ sudo service ndo2db start
Starting ndo2db (via systemctl): [ OK ]
[nagios@usa0300lv1126 ~]$ sudo service nagios start
Starting nagios: done.
[nagios@usa0300lv1126 ~]$ sudo service nagios status
nagios is not running
[nagios@usa0300lv1126 ~]$ sudo service ndo2db status
ndo2db is not running but subsystem locked
i know multiple issues are there we can start working one by one, please advise from where we can start.