"Session timeout" message while monitoring database paramete
"Session timeout" message while monitoring database paramete
Hi Team,
We are monitoring few database parameters on an AIX box. Successfully able to monitor some parameters as mentioned below, but receiving "session timeout" error message while monitoring 'rman_backup-problems'.
successfully monitored
- TNSping
- process usage
- session usage
- sga-data-buffer-hit-ratio
- sga-library-cache-hit-ratio
COMMAND: /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64
/usr/local/nagios/libexec/check_oracle_health --connect '\(DESCRIPTION=\(ADDRESS=\(PROTOCOL=TCP\)\(HOST=<IP>\)\(PORT=1521\)\)\(CONNECT_DATA=
\(SID=<DBname>\)\)\)' --username '<username>' --password '<password>' --mode rman-backup-problems --warning 3 --critical 5
OUTPUT: CRITICAL - connection could not be established within 60 seconds
Note: The leading backslash are not mentioned in the command, but when we click on "Test check command" the command appears in above format.
Kindly suggest.
We are monitoring few database parameters on an AIX box. Successfully able to monitor some parameters as mentioned below, but receiving "session timeout" error message while monitoring 'rman_backup-problems'.
successfully monitored
- TNSping
- process usage
- session usage
- sga-data-buffer-hit-ratio
- sga-library-cache-hit-ratio
COMMAND: /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib ORACLE_HOME=/usr/lib/oracle/12.1/client64
/usr/local/nagios/libexec/check_oracle_health --connect '\(DESCRIPTION=\(ADDRESS=\(PROTOCOL=TCP\)\(HOST=<IP>\)\(PORT=1521\)\)\(CONNECT_DATA=
\(SID=<DBname>\)\)\)' --username '<username>' --password '<password>' --mode rman-backup-problems --warning 3 --critical 5
OUTPUT: CRITICAL - connection could not be established within 60 seconds
Note: The leading backslash are not mentioned in the command, but when we click on "Test check command" the command appears in above format.
Kindly suggest.
Thanks & Regards,
I2MP Team.
I2MP Team.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: "Session timeout" message while monitoring database para
When run from the command line, please paste the full command and output like so:
Code: Select all
# su - nagios
$ <your_full_command>
<the_resulting_output>Previous Nagios employee
Re: "Session timeout" message while monitoring database para
Below is the output when command executed from Nagios Xi server:
[nagios@hostname libexec]$ ./check_oracle_health --connect '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<remoteIP>)(PORT=1521))(CONNECT_DATA=(SID=<DBName>)))' --username '<username>' --password '<passwd>' --mode rman-backup-problems --warning 3 --critical 5
CRITICAL - cannot connect to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521))(CONNECT_DATA=(SID=<DBName>))). install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.12.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at (eval 19) line 3
Compilation failed in require at (eval 19) line 3.
Perhaps a required shared library or dll isn't installed where expected
at ./check_oracle_health line 4755
[nagios@hostname libexec]$ ./check_oracle_health --connect '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<remoteIP>)(PORT=1521))(CONNECT_DATA=(SID=<DBName>)))' --username '<username>' --password '<passwd>' --mode rman-backup-problems --warning 3 --critical 5
CRITICAL - cannot connect to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521))(CONNECT_DATA=(SID=<DBName>))). install_driver(Oracle) failed: Can't load '/usr/local/lib64/perl5/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libocci.so.12.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.
at (eval 19) line 3
Compilation failed in require at (eval 19) line 3.
Perhaps a required shared library or dll isn't installed where expected
at ./check_oracle_health line 4755
Thanks & Regards,
I2MP Team.
I2MP Team.
-
SteveBeauchemin
- Posts: 524
- Joined: Mon Oct 14, 2013 7:19 pm
Re: "Session timeout" message while monitoring database para
Couple suggestions... I monitor more than 100 oracle instances. This is what I do...
the --connect syntax I use isfor example
The other thing is the LD_LIBRARY_PATH and ORACLE_HOME environment variables. Either put them on the command line or make sure they are part of the system environment. For example, I have a file in /etc/profile.d named oracle.sh that looks like this and provides every user login those environment settings.
It makes it easier to run the oracle tests from the command line. So you can either run thisor this, which ever is easier for you
This information is for running from the command line. In the Nagios GUI, the command definition probably has the env defined properly.
Fix your connect string and I think you will succeed.
Good luck.
Steve B
the --connect syntax I use is
Code: Select all
--connect [oracle IP]:[oracle port]/[oracle instance name]Code: Select all
--connect 111.222.333.444:1512/ora1Code: Select all
cat /etc/profile.d/oracle.sh
# Oracle Required Variables for environment
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
if [ -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
else
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib
fiCode: Select all
cd /usr/local/nagios/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 111.222.333.444:1512/ora1 \
--username [ORACLE_USERNAME] \
--password [ORACLE_PASSWORD] \
--mode rman-backup-problems \
--warning 3 \
--critical 5 Code: Select all
cd /usr/local/nagios/libexec
./check_oracle_health --connect 111.222.333.444:1512/ora1 \
--username [ORACLE_USERNAME] \
--password [ORACLE_PASSWORD] \
--mode rman-backup-problems \
--warning 3 \
--critical 5
Fix your connect string and I think you will succeed.
Good luck.
Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
Re: "Session timeout" message while monitoring database para
Thanks @SteveBeauchemin for the help.
I agree, argument for the connect option doesn't seen right
One thing, the test check command button, sometimes adds too much escaping to the command and it may not function so do worry if it doesn't work for some commands.
The best thing is to look at the Service Details after the check has run and see if the output is correct.
If the Status Details for that service is bad, please run the following and post the output.
I agree, argument for the connect option doesn't seen right
One thing, the test check command button, sometimes adds too much escaping to the command and it may not function so do worry if it doesn't work for some commands.
The best thing is to look at the Service Details after the check has run and see if the output is correct.
If the Status Details for that service is bad, please run the following and post the output.
Code: Select all
grep check_oracle_health /usr/local/nagios/etc/commands.cfg
grep rman-backup-problems /usr/local/nagios/etc/services/*
su nagios
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client/lib ORACLE_HOME=/usr/lib/oracle/12.1/client /usr/local/nagios/libexec/check_oracle_health -VBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: "Session timeout" message while monitoring database para
Hi Team,
Please find the below output:
[nagios@nagiosserver libexec]$ grep check_oracle_health /usr/local/nagios/etc/commands.cfg
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
ORACLE_HOME=/usr/lib/oracle/12.1/client64 $USER1$/check_oracle_health $ARG1$
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
ORACLE_HOME=/usr/lib/oracle/12.1/client64 $USER1$/check_oracle_health $ARG1$
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
ORACLE_HOME=/usr/lib/oracle/12.1/client64 $USER1$/check_oracle_health $ARG1$
[nagios@nagiosserver libexec]$ grep rman-backup-problems /usr/local/nagios/etc/services/*
/usr/local/nagios/etc/services/remotehostname1.cfg: service_description <SID/DBname> rman-backup-problems
/usr/local/nagios/etc/services/remotehostname1.cfg: check_command check_xi_oracleserverspace!--connect '(DESCRIPTION=(ADDRESS=
(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521))(CONNECT_DATA=(SID=<DBname/SID>)))' --username '<DBusername>' --password '<DBpasswd>' --mode rman-backup-
problems --warning 3 --critical 5!!!!!!!
/usr/local/nagios/etc/services/remotehostname2.cfg: service_description <SID/DBname> rman-backup-problems
/usr/local/nagios/etc/services/remotehostname2.cfg: check_command check_xi_oracleserverspace!--connect '(DESCRIPTION=(ADDRESS=
(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521))(CONNECT_DATA=(SID=<DBname/SID>)))' --username '<DBusername>' --password '<DBpasswd>' --mode rman-backup-
problems --warning 3 --critical 5!!!!!!!
[nagios@nagiosserver libexec]$ /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client/lib ORACLE_HOME=/usr/lib/oracle/12.1/client
/usr/local/nagios/libexec/check_oracle_health -V
check_oracle_health (1.7.3)
This nagios plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute
copies of this plugin under the terms of the GNU General Public License.
As suggested by you I tried running below command from command line but it is taking very long for the response:
cd /usr/local/nagios/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=<SID/DBname>)))' --username
'<DBusername>' --password '<DBpasswd>' --mode rman-backup-problems --warning 3 --critical 5
from Nagios GUI the response is:
"(Service check timed out after 120.01 seconds)"
Please find the below output:
[nagios@nagiosserver libexec]$ grep check_oracle_health /usr/local/nagios/etc/commands.cfg
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
ORACLE_HOME=/usr/lib/oracle/12.1/client64 $USER1$/check_oracle_health $ARG1$
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
ORACLE_HOME=/usr/lib/oracle/12.1/client64 $USER1$/check_oracle_health $ARG1$
command_line /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
ORACLE_HOME=/usr/lib/oracle/12.1/client64 $USER1$/check_oracle_health $ARG1$
[nagios@nagiosserver libexec]$ grep rman-backup-problems /usr/local/nagios/etc/services/*
/usr/local/nagios/etc/services/remotehostname1.cfg: service_description <SID/DBname> rman-backup-problems
/usr/local/nagios/etc/services/remotehostname1.cfg: check_command check_xi_oracleserverspace!--connect '(DESCRIPTION=(ADDRESS=
(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521))(CONNECT_DATA=(SID=<DBname/SID>)))' --username '<DBusername>' --password '<DBpasswd>' --mode rman-backup-
problems --warning 3 --critical 5!!!!!!!
/usr/local/nagios/etc/services/remotehostname2.cfg: service_description <SID/DBname> rman-backup-problems
/usr/local/nagios/etc/services/remotehostname2.cfg: check_command check_xi_oracleserverspace!--connect '(DESCRIPTION=(ADDRESS=
(PROTOCOL=TCP)(HOST=<IP>)(PORT=1521))(CONNECT_DATA=(SID=<DBname/SID>)))' --username '<DBusername>' --password '<DBpasswd>' --mode rman-backup-
problems --warning 3 --critical 5!!!!!!!
[nagios@nagiosserver libexec]$ /usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client/lib ORACLE_HOME=/usr/lib/oracle/12.1/client
/usr/local/nagios/libexec/check_oracle_health -V
check_oracle_health (1.7.3)
This nagios plugin comes with ABSOLUTELY NO WARRANTY. You may redistribute
copies of this plugin under the terms of the GNU General Public License.
As suggested by you I tried running below command from command line but it is taking very long for the response:
cd /usr/local/nagios/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=<SID/DBname>)))' --username
'<DBusername>' --password '<DBpasswd>' --mode rman-backup-problems --warning 3 --critical 5
from Nagios GUI the response is:
"(Service check timed out after 120.01 seconds)"
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: "Session timeout" message while monitoring database para
The --connect option in your commands is not configured correctly and that is why the checks are failing.
This is the format the check should be using for the --connect string
The <Hostname or IP address> will be the Oracle server's name or IP.
The <Port> will be the port that is opened on the server for remote connections.
The <SID> is the Site Identifier. SID is a unique name for an Oracle database instance.
Here is an example of how the connect option should be formatted in your checks.
It looks like the plugin is installed and functional as when you an the plugin on the command line, it returned the version.
If you update the --connect option in your service checks with the valid information, they should work for you.
You will probably have to contact your Oracle Admin for the information as well as setup the permissions in the database that you are using to connect to the database.
The Simplest way to monitor the Oracle Database it to use the Oracle Wizards in the XI GUI by going to the Config > Configuration Wizards menu and use the Oracle Wizards.
This is the format the check should be using for the --connect string
Code: Select all
--connect <Hostname or IP address>:<port>/<SID>The <Port> will be the port that is opened on the server for remote connections.
The <SID> is the Site Identifier. SID is a unique name for an Oracle database instance.
Here is an example of how the connect option should be formatted in your checks.
Code: Select all
--connect 192.168.1.1:1521/SIDIf you update the --connect option in your service checks with the valid information, they should work for you.
You will probably have to contact your Oracle Admin for the information as well as setup the permissions in the database that you are using to connect to the database.
The Simplest way to monitor the Oracle Database it to use the Oracle Wizards in the XI GUI by going to the Config > Configuration Wizards menu and use the Oracle Wizards.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: "Session timeout" message while monitoring database para
Hi Team,
Below is the output of the command suggested by your team, but didn't succeed:
[nagios@nagiosxi 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 DBserverIp:1521/DBname --username 'username' --password 'passwd' --mode rman-backup-problems --warning 3 --critical 5
CRITICAL - cannot connect to DBserverIp:1521/DBname. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (DBD ERROR: OCIServerAttach)
Note: I am facing this issue only when I am trying to monitor "rman-backup-problem", whereas other database parmeters are monitored successfully on the same server and database.
Kindly help, this issue is lasting from long time
Below is the output of the command suggested by your team, but didn't succeed:
[nagios@nagiosxi 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 DBserverIp:1521/DBname --username 'username' --password 'passwd' --mode rman-backup-problems --warning 3 --critical 5
CRITICAL - cannot connect to DBserverIp:1521/DBname. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (DBD ERROR: OCIServerAttach)
Note: I am facing this issue only when I am trying to monitor "rman-backup-problem", whereas other database parmeters are monitored successfully on the same server and database.
Kindly help, this issue is lasting from long time
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: "Session timeout" message while monitoring database para
If all of the other checks are working except the rman-backup-problems mode, then someone will have to login to the Oracle server and verify that the Recovery Manager is setup on the server and functioning correctly.
Take a look at this link for Troubleshooting RMAN operations on your server.
https://docs.oracle.com/cd/B28359_01/ba ... m#BRADV012
If the Recovery Manager is not going to be configured on the server, then you can delete the check in Nagios XI.
Take a look at this link for Troubleshooting RMAN operations on your server.
https://docs.oracle.com/cd/B28359_01/ba ... m#BRADV012
If the Recovery Manager is not going to be configured on the server, then you can delete the check in Nagios XI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
SteveBeauchemin
- Posts: 524
- Joined: Mon Oct 14, 2013 7:19 pm
Re: "Session timeout" message while monitoring database para
A TNS problem is a TNS problem.
Review your syntax. Try the exact same command with a different mode, such as connection-time.
If other commands work against the same DB, then delete this one that is not working, copy an existing service that is working properly, change the mode, and see if that helps.
The error message is telling you that your connect string is not okay. Compare 2 services side by side and see if you can spot the problem.
Until you get past the TNS issue you cannot even ask about RMAN.
That is what I would do.
Steve B
Review your syntax. Try the exact same command with a different mode, such as connection-time.
If other commands work against the same DB, then delete this one that is not working, copy an existing service that is working properly, change the mode, and see if that helps.
The error message is telling you that your connect string is not okay. Compare 2 services side by side and see if you can spot the problem.
Until you get past the TNS issue you cannot even ask about RMAN.
That is what I would do.
Steve B
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1