Tablespace monitoring
-
kalyanpabolu
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Tablespace monitoring
Hello,
We cross verified the login details. Also, all the tablespaces have some space allocated. Also, all of them are mounted on the same filesystem, so there cannot be any discrepancies. There is no permission issue as well.
We also ran the script by logging in Databases with the nagios user and password and the script was running perfectly fine. It is giving output. The only thing is, it is not showing data in Nagios. I am attaching the screenshot of status in nagios for your reference.
If you see the screenshot, it gives OK - % used but no value.
Looking forward for your help!!
We cross verified the login details. Also, all the tablespaces have some space allocated. Also, all of them are mounted on the same filesystem, so there cannot be any discrepancies. There is no permission issue as well.
We also ran the script by logging in Databases with the nagios user and password and the script was running perfectly fine. It is giving output. The only thing is, it is not showing data in Nagios. I am attaching the screenshot of status in nagios for your reference.
If you see the screenshot, it gives OK - % used but no value.
Looking forward for your help!!
You do not have the required permissions to view the files attached to this post.
Re: Tablespace monitoring
Hi kalyanpabolu,
I have talked to my team here at Nagios and they don't think it is related to the "check_oracle" script since we have proved that it worked on one of the tablespace.
We believe that it is best that you work with your Oracle DBA to try to resolve this.
Here's the one that is working for the below tablespace of "BIPRD" database.
Is EBSPRD reside on the same system as your Nagios XI?
Can you please run the below commands from your Nagios XI machine (command prompt)?
I want to know if Nagios XI machine can communicate with the oracle machine <oracle-port-number>
Please input the correct port and IP (below):
Also, try the below command as well (on Nagios XI command prompt), list ALL opened port on BIPRD and BESPRD:
Regards,
Vinh
I have talked to my team here at Nagios and they don't think it is related to the "check_oracle" script since we have proved that it worked on one of the tablespace.
We believe that it is best that you work with your Oracle DBA to try to resolve this.
Here's the one that is working for the below tablespace of "BIPRD" database.
Code: Select all
[root@monprdmgtss03 plugins]# ./check_oracle --tablespace BIPRD "nagios" "n46105" 'BIPRD1117_BIPLATFORM' 90 85
BIPRD : BIPRD1117_BIPLATFORM OK - 80.70% used [ 116488 / 601083 MB available ]|BIPRD1117_BIPLATFORM=80.70%;85;90;0;100
Can you please run the below commands from your Nagios XI machine (command prompt)?
I want to know if Nagios XI machine can communicate with the oracle machine <oracle-port-number>
Please input the correct port and IP (below):
Code: Select all
ping <IP of EBSPRD>
nmap -Pn -p <oracle-port-number> <IP of BIPRD server>
nmap -Pn -p <oracle-port-number> <IP of BESPRD server>
Code: Select all
nmap -Pn <IP of BIPRD server>
nmap -Pn <IP of BESPRD server>
Vinh
-
kalyanpabolu
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Tablespace monitoring
Hello,
The IP address of EBSPRD and BIPRD is same as both DBs are on same server.
Below is the output of commands:
[root@monprdmgtss03 ~]# ping 10.50.32.9
PING 10.50.32.9 (10.50.32.9) 56(84) bytes of data.
64 bytes from 10.50.32.9: icmp_seq=1 ttl=64 time=0.387 ms
64 bytes from 10.50.32.9: icmp_seq=2 ttl=64 time=0.386 ms
64 bytes from 10.50.32.9: icmp_seq=3 ttl=64 time=0.217 ms
^C
--- 10.50.32.9 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.217/0.330/0.387/0.079 ms
[root@monprdmgtss03 ~]#
[root@monprdmgtss03 ~]# nmap -P0 -p 1521 10.50.32.9
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2021-02-24 13:15 GST
Interesting ports on 10.50.32.9:
PORT STATE SERVICE
1521/tcp open oracle
Nmap finished: 1 IP address (1 host up) scanned in 0.087 seconds
[root@monprdmgtss03 ~]#
[root@monprdmgtss03 ~]# nmap -P0 10.50.32.9
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2021-02-24 13:16 GST
Interesting ports on 10.50.32.9:
Not shown: 1672 filtered ports
PORT STATE SERVICE
22/tcp open ssh
111/tcp open rpcbind
443/tcp closed https
892/tcp open unknown
1521/tcp open oracle
1522/tcp closed rna-lm
1523/tcp closed cichild-lm
2049/tcp open nfs
Nmap finished: 1 IP address (1 host up) scanned in 21.542 seconds
[root@monprdmgtss03 ~]#
Is EBSPRD reside on the same system as your Nagios XI? - No
The IP address of EBSPRD and BIPRD is same as both DBs are on same server.
Below is the output of commands:
[root@monprdmgtss03 ~]# ping 10.50.32.9
PING 10.50.32.9 (10.50.32.9) 56(84) bytes of data.
64 bytes from 10.50.32.9: icmp_seq=1 ttl=64 time=0.387 ms
64 bytes from 10.50.32.9: icmp_seq=2 ttl=64 time=0.386 ms
64 bytes from 10.50.32.9: icmp_seq=3 ttl=64 time=0.217 ms
^C
--- 10.50.32.9 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.217/0.330/0.387/0.079 ms
[root@monprdmgtss03 ~]#
[root@monprdmgtss03 ~]# nmap -P0 -p 1521 10.50.32.9
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2021-02-24 13:15 GST
Interesting ports on 10.50.32.9:
PORT STATE SERVICE
1521/tcp open oracle
Nmap finished: 1 IP address (1 host up) scanned in 0.087 seconds
[root@monprdmgtss03 ~]#
[root@monprdmgtss03 ~]# nmap -P0 10.50.32.9
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2021-02-24 13:16 GST
Interesting ports on 10.50.32.9:
Not shown: 1672 filtered ports
PORT STATE SERVICE
22/tcp open ssh
111/tcp open rpcbind
443/tcp closed https
892/tcp open unknown
1521/tcp open oracle
1522/tcp closed rna-lm
1523/tcp closed cichild-lm
2049/tcp open nfs
Nmap finished: 1 IP address (1 host up) scanned in 21.542 seconds
[root@monprdmgtss03 ~]#
Is EBSPRD reside on the same system as your Nagios XI? - No
Re: Tablespace monitoring
Please edit your /usr/local/nagios/libexec/check_oracle file and change this:
To this:
Then run the plugin from the command line (from an SSH session) against one of the failing ones and send me the entire output.
Revert the change once you are done.
Does this one work for you?
If not, make sure this file has the proper oracle_home/ld_library_path paths:
Code: Select all
exit "$STATE_OK"Code: Select all
echo "$result"
exit "$STATE_OK"Revert the change once you are done.
Does this one work for you?
Code: Select all
. /usr/local/nagiosxi/etc/configwizards/oracle/oracle && /usr/local/nagios/libexec/check_oracle_health --connect 'X.X.X.X:1521/XE' --username 'username' --password 'password' --mode tablespace-free --warning 5: --critical 2: -d -vCode: Select all
/usr/local/nagiosxi/etc/configwizards/oracle/oracle-
kalyanpabolu
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Tablespace monitoring
Hello,
When I am trying to run the plugin from command line, gettignbelow error:
[root@monprdmgtss03 plugins]# ./check_oracle --tablespace -s BIPRD -d 'BIPRD1117_BIPLATFORM' -w 80 -c 90
./check_oracle: line 244: [: -w: integer expression expected
CRITICAL - ORA-12154: TNS:could not resolve the connect identifier specified
[root@monprdmgtss03 plugins]#
When I am trying to run the plugin from command line, gettignbelow error:
[root@monprdmgtss03 plugins]# ./check_oracle --tablespace -s BIPRD -d 'BIPRD1117_BIPLATFORM' -w 80 -c 90
./check_oracle: line 244: [: -w: integer expression expected
CRITICAL - ORA-12154: TNS:could not resolve the connect identifier specified
[root@monprdmgtss03 plugins]#
Re: Tablespace monitoring
Hi,
Please check the syntax for "check_oracle" as follows:
So, your syntax for checking "tablespace" is:
Example:
Regards,
Vinh
Please check the syntax for "check_oracle" as follows:
Code: Select all
print_usage() {
echo "Usage:"
echo " $PROGNAME --tns <Oracle Sid or Hostname/IP address>"
echo " $PROGNAME --db <ORACLE_SID>"
echo " $PROGNAME --login <ORACLE_SID>"
echo " $PROGNAME --connect <ORACLE_SID>"
echo " $PROGNAME --cache <ORACLE_SID> <USER> <PASS> <CRITICAL> <WARNING>"
echo " $PROGNAME --tablespace <ORACLE_SID> <USER> <PASS> <TABLESPACE> <CRITICAL> <WARNING>"
echo " $PROGNAME --oranames <Hostname>"
echo " $PROGNAME --help"
echo " $PROGNAME --version"
}
Code: Select all
./check_oracle --tablespace <ORACLE_SID> <USER> <PASS> <TABLESPACE> <CRITICAL> <WARNING>
Code: Select all
./check_oracle --tablespace BIPRD "nagios" "n46105" 'BIPRD1117_BIPLATFORM' 90 85
Vinh
-
kalyanpabolu
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Tablespace monitoring
Hello,
Below is the output:
[opc@monprdmgtss03 plugins]$ ./check_oracle --tablespace BIPRD "nagios" "n46105" 'BIPRD1117_BIPLATFORM' 90 85
BIPRD : BIPRD1117_BIPLATFORM OK - 80.70% used [ 116478 / 601083 MB available ]|BIPRD1117_BIPLATFORM=80.70%;85;90;0;100
[opc@monprdmgtss03 plugins]$
[opc@monprdmgtss03 plugins]$
[opc@monprdmgtss03 plugins]$ ./check_oracle --tablespace BIPRD "nagios" "n46105" 'BIPRD1117_IAS_TEMP' 90 85
./check_oracle: line 287: [: : integer expression expected
./check_oracle: line 291: [: : integer expression expected
./check_oracle: line 295: [: : integer expression expected
BIPRD : BIPRD1117_IAS_TEMP OK - % used [ / MB available ]|BIPRD1117_IAS_TEMP=%;85;90;0;100
[opc@monprdmgtss03 plugins]$
For one tablespace getting correct output, but getting some error message for the other one.
Please suggest.
Below is the output:
[opc@monprdmgtss03 plugins]$ ./check_oracle --tablespace BIPRD "nagios" "n46105" 'BIPRD1117_BIPLATFORM' 90 85
BIPRD : BIPRD1117_BIPLATFORM OK - 80.70% used [ 116478 / 601083 MB available ]|BIPRD1117_BIPLATFORM=80.70%;85;90;0;100
[opc@monprdmgtss03 plugins]$
[opc@monprdmgtss03 plugins]$
[opc@monprdmgtss03 plugins]$ ./check_oracle --tablespace BIPRD "nagios" "n46105" 'BIPRD1117_IAS_TEMP' 90 85
./check_oracle: line 287: [: : integer expression expected
./check_oracle: line 291: [: : integer expression expected
./check_oracle: line 295: [: : integer expression expected
BIPRD : BIPRD1117_IAS_TEMP OK - % used [ / MB available ]|BIPRD1117_IAS_TEMP=%;85;90;0;100
[opc@monprdmgtss03 plugins]$
For one tablespace getting correct output, but getting some error message for the other one.
Please suggest.
Re: Tablespace monitoring
Hi,
Please run the below sqlplus select commands and post the outputs/results here.
This will give us a better understanding of why'BIPRD1117_BIPLATFORM'works and 'BIPRD1117_IAS_TEMP' did not.
#1A) Check STATUS of 'BIPRD1117_IAS_TEMP':
#1B) Check STATUS of 'BIPRD1117_BIPLATFORM':
#2A) Check 'BIPRD1117_IAS_TEMP' in DBA_DATA_FILES:
#2B) Check 'BIPRD1117_BIPLATFORM' in DBA_DATA_FILES:
#3A) Check 'BIPRD1117_IAS_TEMP' in DBA_FREE_SPACE:
#3B) Check 'BIPRD1117_BIPLATFORM' in DBA_FREE_SPACE:
Regards,
Vinh
Please run the below sqlplus select commands and post the outputs/results here.
This will give us a better understanding of why'BIPRD1117_BIPLATFORM'works and 'BIPRD1117_IAS_TEMP' did not.
#1A) Check STATUS of 'BIPRD1117_IAS_TEMP':
Code: Select all
result=`sqlplus -s "nagios"/"n46105"@"BIPRD" << EOF
select STATUS
from DBA_TABLESPACES
WHERE tablespace_name='BIPRD1117_IAS_TEMP';
EOF`
echo $result
Code: Select all
result=`sqlplus -s "nagios"/"n46105"@"BIPRD" << EOF
select STATUS
from DBA_TABLESPACES
WHERE tablespace_name='BIPRD1117_BIPLATFORM';
EOF`
echo $result
Code: Select all
result=`sqlplus -s "nagios"/"n46105"@"BIPRD" << EOF
select BYTES
from DBA_DATA_FILES
WHERE tablespace_name='BIPRD1117_IAS_TEMP';
EOF`
echo $result
Code: Select all
result=`sqlplus -s "nagios"/"n46105"@"BIPRD" << EOF
select BYTES
from DBA_DATA_FILES
WHERE tablespace_name='BIPRD1117_BIPLATFORM';
EOF`
echo $result
Code: Select all
result=`sqlplus -s "nagios"/"n46105"@"BIPRD" << EOF
select BYTES
from DBA_FREE_SPACE
WHERE tablespace_name='BIPRD1117_IAS_TEMP';
EOF`
echo $result
Code: Select all
result=`sqlplus -s "nagios"/"n46105"@"BIPRD" << EOF
select BYTES
from DBA_FREE_SPACE
WHERE tablespace_name='BIPRD1117_BIPLATFORM';
EOF`
echo $result
Vinh
-
kalyanpabolu
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Tablespace monitoring
Hello,
PFA the output.
PFA the output.
You do not have the required permissions to view the files attached to this post.
-
kalyanpabolu
- Posts: 246
- Joined: Fri Jul 03, 2020 4:18 am
Re: Tablespace monitoring
Hello,
Attached is the last screenshot
Attached is the last screenshot
You do not have the required permissions to view the files attached to this post.