Nagios monitors Oracle Alert log Scripts

Source: Internet
Author: User

It's going to be a little nagios, you know how to use it. # Add Nagios to Oinstall group #usermod-a-G Oinstall Nagios
#!/bin/sh
dbversion=11
Bdump=/u01/app/oracle/oradata/prod/dump/diag/rdbms/prod/prod/trace/alert_prod.log
state_ok=0
state_warning=1
state_critical=2
state_unknown=3
if [$dbversion = one]
Then ins_log_pwd= $bdump
Else
ins_log_pwd= $ORACLE _base/admin/$SERVICE _name/bdump/alert_$oracle_sid.log
fi
if [' Tail-50 $ins _log_pwd | grep ' ora-' |grep-v-i-e ' 1013|1031|1144|1652|1722|8103|12012|3297|1410|2050|3113|3136 |1555|1461|00600|1580|27054|6512 ' | Wc-l '-GT 0];then
dmsgtmp= ' tail-50 $ins _log_pwd | grep ' ora-' |grep-v-i-e ' 1013|1031|1144|1652|1722|8103|12012|3297|1410|2050|3113 |3136|1555|1461|00600|1580|27054|6512 "
echo "critical-$dmsgtmp"
echo "Oracle log Result:" >>/home/nagios/alert.log
echo "instance alert check Result: $dmsgtmp" >>/home/nagios/alert.log
echo ' Date +%y-%m-%d-%h:%m:%s ' >>/home/nagios/alert.log
Exit $STATE _critical
fi
if [' Tail-50 $ins _log_pwd | grep ' ora-' |grep-v-i-e ' 1013|1031|1144|1652|1722|8103|12012|3297|1410|2050|3113|3136 |1555|1461|00600|1580|27054|6512 ' | Wc-l '-eq 0];then
echo "No error"
Exit $STATE _OK
fi






Error control: ORA-1013: User requested to cancel the current operation
ORA-1031: Insufficient Permissions
ORA-1144: File size (block) exceeds the maximum number of blocks
ORA-1652: Unable to extend temp segment by (in table space)
ORA-1722: Invalid number
Ora-8103:object no longer exists "
*cause:the object has been deleted by another user since the operation
Began, or a prior incomplete recovery restored the database to
A point in time during the deletion of the object.
*action:delete The object if this is the result of an incomplete
Recovery.
Ora-12012:error on auto execute of Job scheduled task execution failed
Ora-3297:file contains used data beyond requested RESIZE value
Cause:some portion of the file in the region to be trimmed are currently in use by a database object
Action:drop or move segments containing extents in this region prior to resizing the file, or choose a Resize value s Uch that's only free space was in the trimmed.
ORA-1410: Invalid ROWID
ORA-2050: Transaction processing has been re-calculated, some remote DBs may be having problems
ORA-3113:
Ora-3136:inbound Connection timed out
ORA-1555: Snapshot Too old: Fallback segment number in the name "" Too small snapshot too
ORA-1461: You can only assign a long value to insert a long column
ORA-00600: Deadlock
ORA-1580: Error Creating control backup file
Ora-27054:nfs file system where the file is created or resides are not mounted with correct options
ORA-6512: Similar to this Ora-06512:at "SYS. Dbms_isched ", Line 3761
Ora-06512:at "SYS. Dbms_isched ", line 772
Ora-06512:at "SYS. Dbms_scheduler ", line 1236
Ora-06512:at Line 2

Nagios monitors Oracle alert log scripts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.