Page 2 of 2
Re: "Session timeout" message while monitoring database para
Posted: Tue Jun 20, 2017 1:15 pm
by tgriep
Thanks
@SteveBeauchemin for the help,
@RIDS_I2MP let us know what you find out.
Re: "Session timeout" message while monitoring database para
Posted: Fri Aug 11, 2017 12:32 am
by RIDS_I2MP
Hi Team,
The Recovery Manager is setup on the server and RMAN backups are getting generated and we do not find any issues from the recovery manager.
We have also compared the commands with the one which is working fine on other servers, didn't find any change. But still we are unable to monitor RMAn backup parameter.
Kindly suggest
Re: "Session timeout" message while monitoring database para
Posted: Fri Aug 11, 2017 11:00 am
by tgriep
Are other check_oracle_health checks that are setup on that server working except the RMAN backups or are all of them failing?
Re: "Session timeout" message while monitoring database para
Posted: Mon Aug 14, 2017 1:00 am
by RIDS_I2MP
Rest all check_oracle_health checks are working fine only rman_backup_problems is failing.
Re: "Session timeout" message while monitoring database para
Posted: Mon Aug 14, 2017 11:03 am
by tgriep
Since all of the other commands are running, then it could be that the server's table that stores that information is not getting updated or it has a permission problem.
What version of Oracle are you running the check against?
Can you post the full command you are running as well as the error?
Re: "Session timeout" message while monitoring database para
Posted: Fri Aug 18, 2017 3:56 am
by RIDS_I2MP
Hi Team,
Oracle version running on the host is 12.1.0.1.0
How can we check whether the server's table that stores the information is getting updated or not ? (as you said in above statements)
What the permissions required and to which user ? (as you mentioned in above statements)
Below is the command(which is working fine for other parameters) and output:
[nagios@nagiosserver ~]$ cd /usr/local/nagios/libexec/
[nagios@nagiosserver libexec]$ /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 ./check_oracle_health --connect '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521))(CONNECT_DATA=(SID=<DBname>)))' --username 'nagios' --password '<passwd>' --mode rman-backup-problems --warning 3 --critical 5
UNKNOWN - check_oracle_health timed out after 60 seconds
Below command is constructed as suggested by Nagios forum members in above conversation:
[nagios@nagiosserver libexec]$ /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64 ./check_oracle_health --connect <IP>:1521/<DBname> --username 'nagios' --password '<passwd>' --mode rman-backup-problems --warning 3 --critical 5
CRITICAL - cannot connect to <IP>:1521/<DBname>. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (DBD ERROR: OCIServerAttach)
Didn't succeed in both commands.
Re: "Session timeout" message while monitoring database para
Posted: Fri Aug 18, 2017 11:04 am
by tgriep
When you are running the plugin and using the mode rman-backup-problems, it is running the following query on the server
Code: Select all
SELECT COUNT(*) FROM v$rman_status WHERE status != 'COMPLETED' AND status != 'RUNNING' AND start_time > sysdate-3
Verify that the v$rman_status table on the Oracle Server exists and that the user account can access it.
An example of how to setup the permissions are below.
create user nagios identified by oradbmon;
grant create session to nagios;
grant select any dictionary to nagios;
grant select on V_$SYSSTAT to nagios;
grant select on V_$INSTANCE to nagios;
grant select on V_$LOG to nagios;
grant select on SYS.DBA_DATA_FILES to nagios;
grant select on SYS.DBA_FREE_SPACE to nagios;
--
-- if somebody still uses Oracle 8.1.7...
grant select on sys.dba_tablespaces to nagios;
grant select on dba_temp_files to nagios;
grant select on sys.v_$Temp_extent_pool to nagios;
grant select on sys.v_$TEMP_SPACE_HEADER to nagios;
grant select on sys.v_$session to nagios;
Which I found at the link below.
https://labs.consol.de/nagios/check_ora ... index.html
Re: "Session timeout" message while monitoring database para
Posted: Fri Oct 06, 2017 4:47 am
by RIDS_I2MP
Hi Team,
The permissions are the same provided by you in above update.
I have executed the same query on two different servers the out is COUNT(*)= 0 but the server on which the monitoring is not working as expected is taking long time to execute the query whereas on the other server the output is populated within secs (on which Nagios monitoring is working fine).
Let me know if this delay in populating the output is the reason for the error message received "(Service check timed out after 120.01 seconds)" on the Nagios GUI ?
Re: "Session timeout" message while monitoring database para
Posted: Fri Oct 06, 2017 9:57 am
by scottwilkerson
RIDS_I2MP wrote:Let me know if this delay in populating the output is the reason for the error message received "(Service check timed out after 120.01 seconds)" on the Nagios GUI ?
It absolutely would be the case. The error you are getting is that you aren't getting the response before the plugin times out after 120 seconds.
You are going to need to increase the plugin timeout, and likely the following in the nagios.cfg
to something like
where the number is the amount of seconds to wait, but really long running plugins should be run on a much less frequent timeframe or you can have a stacking problem where you overload the server you are checking.