Nagios monitoring oracle alert Log script, nagiosalert

Source: Internet
Author: User

Nagios monitoring oracle alert Log script, nagiosalert
Click Nagios to know how to use it # Add nagios to the 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 = 11]
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 '| 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 '| wc-l'-eq 0]; then
Echo "No error"
Exit $ STATE_ OK
Fi






Error Control: ORA-1013: user request to cancel the current action
ORA-1031: insufficient Permissions
ORA-1144: file size (Block) exceeds the maximum number of blocks
ORA-1652: unable to extend temp segments through (in tablespace)
ORA-1722: Invalid Number
The 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
// 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
The ORA-3297: file contains used data beyond requested RESIZE value
Cause: Some portion of the file in the region to be trimmed is 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 such that only free space is in the trimmed.
ORA-1410: Invalid ROWID
ORA-2050: Transaction processing is recalculated and some remote DBs may be faulty
ORA-3113:
ORA-3136: inbound connection timed out
ORA-1555: snapshot too old: rollback field number in the name "" too small snapshot too old
ORA-1461: Can only assign values to LONG values inserted into LONG Columns
ORA-00600: deadlock
ORA-1580: Error creating control backup file
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
ORA-6512: ORA-06512 like this: 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

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.