"Session timeout" message while monitoring database paramete

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: "Session timeout" message while monitoring database para

Post by tgriep »

Thanks @SteveBeauchemin for the help, @RIDS_I2MP let us know what you find out.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: "Session timeout" message while monitoring database para

Post 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
Thanks & Regards,
I2MP Team.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: "Session timeout" message while monitoring database para

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: "Session timeout" message while monitoring database para

Post by RIDS_I2MP »

Rest all check_oracle_health checks are working fine only rman_backup_problems is failing.
Thanks & Regards,
I2MP Team.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: "Session timeout" message while monitoring database para

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: "Session timeout" message while monitoring database para

Post 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.
Thanks & Regards,
I2MP Team.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: "Session timeout" message while monitoring database para

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: "Session timeout" message while monitoring database para

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

Re: "Session timeout" message while monitoring database para

Post 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

Code: Select all

service_check_timeout=120
to something like

Code: Select all

service_check_timeout=300
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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked