Metrics to monitor Alert Log

Hi,
I am trying to make modification in metric for monitoring alertlog.
When I try to add a new line,it's asking for field "Time/Line Number",any one know what should be the value for that?
Description on that page --> "The table lists all Time/Line Number objects monitored for this metric. You can specify different threshold settings for each Time/Line Number object." doesn''t make much sense to me.
I gave a dummy value 50,but it doesn't seem to work..
Any help is highly appreciated... thanks...

For monitoring <11g database note 976982.1 may be of use to you: https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=BULLETIN&id=976982.1;
For monitoring 11g db's see note 949858.1 (Monitoring 11g Database Alert Log Errors in Enterprise Manager)
I your case you may want to consider to create a UDM, see Monitor Non Critical 11g Database Alert Log Errors Using a SQL UDM [ID 961682.1]
Eric

Similar Messages

  • User Defined Metric for default ALERT log directory

    On our system we have moved the alert log to a non-default location. If we use the wrong initialization file or something else goes haywire then trace files and alert logs get placed in the $ORACLE_HOME/rdbms/log directory.
    I want to create a user defined metric for each machine that will look in all the $ORACLE_HOME/rdbms/log directories for each ORACLE_HOME on the server checking for any alert*.log or *.trc files. Creating an alert if it encounters any of these files.
    I don't know if I should do it as a host UDM or an instance UDM. And more to the point how do I get it to see the multiple homes if the server has more than one.
    Any ideas would be appreciated.
    Thanks
    Tim

    Well I did it with a host UDM calling a local script (which will be installed on shared drives for the development/test and production systems).
    The local script cats the /var/opt/oracle/oratab file eliminating lines beginning with # or $ then takes the second argument of each line and loops through all entries using a checkit procedure. The checkit procedure determines if the appropriate log directores exist for the oracle home and does a find on the diretory looking for alert*.log and *.trc. If there are any then global variables get updated with the count and directory name.
    There is an if statement before exit that checks of the count of files is greater than zero and write an appropriate em_result and em_message depending on the results.
    I then created the UDM in EM to call this script and check for critical/warning thresholds.
    Regards
    Tim

  • Alert Log File Monitoring of 8i and 9i Databases with EM Grid Control 10g

    Is it possible to monitor alert log errors in Oracle 8i/9i Databases with EM Grid Control 10g and EM 10g agents? If yes, is it possible to get some kind of notification?
    I know that in 10g Database, it is possible to use server generated alerts, but what about 8i/9i?
    Regards,
    Martin

    Hello
    i am interested in a very special feature: is it possible to get notified if alerts occur in alert logs in an 8i/9i database when using Grid control and the 10g agent on the 8i/9i systems?
    Moreover, the 10g agent should be able to get Performance Data using the v$ views or direct sga access without using statspack, right?
    Do you know where I can find documentation about the supported features when using Grid Control with 8i/9i databases?

  • User defined metrics for alert log errors

    I want to create UDM for getting the full description of alert log ORA -  error to be reported via E-mail.  Can somebody guide me or help me withe script which can be used to create this alert.  Currently, We get the only the message of  that error is generated; which request us to manually check the alert to log to figure out the error.

    Hi,
    what metric did you use and what is the database version.
    There are metrics related to alert log errors but those which have status at the end of a name return number of errors
    and w/o status provide error description:
    11g
    Generic Incident - error message
    Generic Incident Status - number of errors
    10g
    Generic Alert Log Error - error message
    Generic Alert Log Error Status - number of errors
    Did you set Generic Incident or Generic Alert Log Error? If description is not enough
    you might use UDM but it would be easier for 11g since there are internal views which
    have access to ADR, for 10g it will be required to build additional procedure (to open and read alert log)

  • Cloud Control 12c monitoring Oracle 11g Standard Edition alert.log

    Hi guys.
    I just installed Cloud Control 12c3 and added my cluster database, I have readed many papers, tech docs and tech discuss and now i have a huge confussion about packs, licensing and other fruits. Please help...
    I have four Oracle 11g databases (differents hosts) Standard Edition, and i want monitoring and notificate alert.log errors. For example, if alert.log says "ORA-01438, blablabla" i want a email notification. 
    I read about packs, and says that "diagnostic pack" is needed for alert.log monitoring in Cloud Control 12c. But my version database is Standard Edition without packs, so I CAN'T MONITORING ALERT LOG!!!.
    Question:
      Do I really need Diagnostic Pack for monitoring alert.log with Cloud Control?
      If Diagnostinc Pack is not necessary, how can i monitoring alert.log?
    Thanks

    I do not think you require any pack for alert.log content monitoring but you might need to check with Oracle rep. I am saying so because if you go to the "Alert log content" page and click on management pack for this page, Grid will display a message that this page does not require any pack.
    Go to the Alert log content by "oracle database -> logs -> alert log contents"
    then
    go to SETUP -> management packs -> packs for this page
    You will see the message will be displayed " this pages does not require any pack"
    Can you also provide the doc where it says that this pae needs diagnostic pack?

  • Alert log monitoring in dbconsole 11.2.0.2.0

    Hullo
    Is there a way to tune out certain ORA- alerts from alerting via dbconsole? At the moment we are getting all  ORA-0600s and some of them we dont need waking up by!
    Thanks.
    11.2.0.3
    RHEL 5.5

    Do you have metalink support? This is the doc you want to check into .. yes it is possible.
    Database Alert log monitoring in 12c explained (Doc ID 1538482.1)
    From this doc...
    You need to get fancy with the regexp..
    Setting thresholds for alert log metrics
    Setting of the thresholds is a very complex and wide area and the values are depending on the requirements, the DBA experience and environments being monitored. This can be achieved by going to the Database target menu->Monitoring->Metrics and collection settings->Edit the "Generic Alert Log Error" from the 3 blue pencils icon on the right.
    By default, the "Generic Alert Log Error" Warning threshold is set to "ORA-0*(600?|7445|4[0-9][0-9][0-9])[^0-9]" which means:
    ORA-0*(600?|7445|4[0-9][0-9][0-9])[^0-9] - the string ORA-0
    ORA-0*(600?|7445|4[0-9][0-9][0-9])[^0-9] - folowed by none ore more zeroes
    ORA-0*(600?|7445|4[0-9][0-9][0-9])[^0-9] - followed by 600 or 60 (the ? operator means "there is zero or one of the preceding element")
    ORA-0*(600?|7445|4[0-9][0-9][0-9])[^0-9] - or it can be 7445
    ORA-0*(600?|7445|4[0-9][0-9][0-9])[^0-9] - or it can be anything between 4000 and 4999
    ORA-0*(600?|7445|4[0-9][0-9][0-9])[^0-9] - it can follow anything but a number
    For setting the thresholds, a Regular expression (RegExp) as the one above needs to be used.

  • Operations Manager - KMS Idle Minutes Monitor Alerts - False Positives As Event ID 12290 Still Being Logged

    Hi all,
    I am using System Center 2012 R2 Operations Manager with the Key Management Service Management Pack at version 6.0.7234.0, and I keep receiving the following alert in Operations Manager:
    "Idle Minutes Monitor Alert:
    Key Management Service (KMS) inactivity exceeded threshold
    Knowledge:
    Summary:
    The purpose of this rule is to alert system administrators to a possible KMS or network outage. This rule monitors the end-to-end operation of KMS activation. A notification event is created by KMS if no activation or renewal requests were logged by KMS
    (activity event 12290) in the specified time interval. In addition to new activations, periodic renewal requests are expected to occur (default is 7 days). Whether or not this alert is serious depends on the number of machines in the KMS environment, how many
    are actually connected, and the configured renewal interval.
    Causes:
    Any failure or incorrect configuration of the KMS service, other Windows components, firewall, hardware, network or routers can trigger the Idle Minutes Alert. This alert can also result from normal behavior, since it is possible that not enough machines
    attempted to activate or renew during the specified time interval.
    Resolutions:
    The first step is to determine whether there really is a problem. Start with a known good KMS client and run (with elevated privileges) the script slmgr.vbs -ato . If the activation/renewal fails, it will report an error code. You can direct the client to
    connect to a specific KMS machine by using the slmgr.vbs -skms option. The request event (12288) and response event (12289) in the Windows Application event log may provide additional information, including the identity of failing KMS machines. If there has
    been a failure, check the following:
    Software Licensing service (slsvc) is running.
    Other KMS machine behavior is normal.
    KMS firewall port is open (default is TCP 1688).
    Attempt to connect to KMS using telnet to the KMS port(you won’t be able to do anything other than connect)
    Use a network monitor (e.g. netmon) to capture and trace network problems.
    There is one Idle Minutes Monitor that is used to monitor for activity. It may be desirable to adjust the time threshold, depending on expected KMS activity."
    Despite what the alert says, there are activity events with ID 12290 being logged, but they are appearing under the 'Key Management Service' log instead of the general 'Application' log.  I know that my clients are activating with the server without
    any problems as I have run slmgr.vbs -ato with success on a number of them, and none are stating that activation is required.  This issue was previously raised here:
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/1391acf8-f0be-4a48-9039-8d24e275f1fd/kms-idle-time-monitor-raise-wrong-alerts?forum=operationsmanagermgmtpacks, but  I am running Windows Server 2008 R2 SP1 and the hotfix KB981314 comes
    up as 'not applicable to this computer' so I assume it is part of SP1 now.  I have also tried installing KB2692929, as that was cited as being a possible fix here:
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/8ec8ae5b-a310-4b0f-9a5f-e0599bceb93a/kms-managementpack?forum=operationsmanagermgmtpacks, however I am still seeing the same alerts.
    Would greatly appreciate any further suggestions!
    Many thanks

    Hi,
    I've checked for all the events that are generated by our servers, and there are periods of time where no requests are received for up to 18 hours, so that is no doubt why the alerts are appearing (we then sometimes see five requests in the same minute,
    but there we go).  I'll need to adjust the thresholds.
    Thank you for your help, Chunky.1, I'll mark your reply as the answer, as it was very helpful in understanding the alert.
    For anyone else who needs to check this, create a PowerShell script using the following content, and place your own details into the relevant sections in bold (without the brackets, of course).  This will generate a csv file which will have the server
    name in one column and the time that the request event was generated - you can then check the gaps between the requests.  The script is quick and dirty, with no checks along the way, so feel free to embellish it as required.
    Out-File "<directory to place file in>\KMS_check_results.csv"
    $results = get-eventlog -ComputerName <KMS server hostname> -logname 'Key Management Service'|where{$_.message -match "<String which identifies servers instead of clients>"}
    $filteredresults = @()
    foreach($event in $results){
        #This splits up the message into sections, separated by commas, and places each section as an element in an array
        $event.Message -split ","|foreach{
            if($_ -match "<server domain suffix - e.g. contoso.com>"){
                $eventserver = $_
        $timegenerated = $event.TimeGenerated
        $filteredresults += New-Object PSObject -Property @{
            Server = $eventserver
            TimeGenerated = $timegenerated
    $filteredresults|select-object server,timegenerated|export-csv "<directory to place file in>\KMS_check_results.csv"  -NoTypeInformation

  • Alert log monitor help

    Hello,
    I am very new to shell scripting. Our DB is 10g on AIX. And i wanted to setup something that will monitor my alertlog and send me e-mail out. And i found this online. But have very little knowledge on cronjob. I can set one up. But this script dont tell what goes here. Here is the script that i found online. So if anyone could give me what goes where i would be thankfull. it does says put the check_alert.awk someplace. But is that where the cron comes in place. i mean do i schedule check_alert.awk in my cronjob ??? Just wanted to know what parts goes where and how to set this up the right way so i get e-mail alert for my alert log. a step - step process would be good. Thanks
    UNIX shell script to monitor and email errors found in the alert log. Is ran as the oracle OS owner. Make sure you change the "emailaddresshere" entries to the email you want and put the check_alert.awk someplace. I have chosen $HOME for this example, in real life I put it on as mounted directory on the NAS.
    if test $# -lt 1
    then
    echo You must pass a SID
    exit
    fi
    # ensure environment variables set
    #set your environment here
    export ORACLE_SID=$1
    export ORACLE_HOME=/home/oracle/orahome
    export MACHINE=`hostname`
    export PATH=$ORACLE_HOME/bin:$PATH
    # check if the database is running, if not exit
    ckdb ${ORACLE_SID} -s
    if [ "$?" -ne 0 ]
    then
    echo " $ORACLE_SID is not running!!!"
    echo "${ORACLE_SID is not running!" | mailx -m -s "Oracle sid ${ORACLE_SID} is not running!" "
    |emailaddresshere|"
    exit 1
    fi;
    #Search the alert log, and email all of the errors
    #move the alert_log to a backup copy
    #cat the existing alert_log onto the backup copy
    #oracle 8 or higher DB's only.
    sqlplus '/ as sysdba' << EOF > /tmp/${ORACLE_SID}_monitor_temp.txt
    column xxxx format a10
    column value format a80
    set lines 132
    SELECT 'xxxx' ,value FROM v\$parameter WHERE name = 'background_dump_dest'
    exit
    EOF
    cat /tmp/${ORACLE_SID}_monitor_temp.txt | awk '$1 ~ /xxxx/ {print $2}' > /tmp/${ORACLE_SID}_monitor_location.txt
    read ALERT_DIR < /tmp/${ORACLE_SID}_monitor_location.txt
    ORIG_ALERT_LOG=${ALERT_DIR}/alert_${ORACLE_SID}.log
    NEW_ALERT_LOG=${ORIG_ALERT_LOG}.monitored
    TEMP_ALERT_LOG=${ORIG_ALERT_LOG}.temp
    cat ${ORIG_ALERT_LOG} | awk -f $HOME/check_alert.awk > /tmp/${ORACLE_SID}_check_monitor_log.log
    rm /tmp/${ORACLE_SID}_monitor_temp.txt 2>/dev/null
    if [ -s /tmp/${ORACLE_SID}_check_monitor_log.log ]
    then
    echo "Found errors in sid ${ORACLE_SID}, mailed errors"
    echo "The following errors were found in the alert log for ${ORACLE_SID}" > /tmp/${ORACLE_SID}_check_monitor_log.mail
    echo "Alert log was copied into ${NEW_ALERT_LOG}" >> /tmp/${ORACLE_SID}_check_monitor_log.mail
    echo " "
    date >> /tmp/${ORACLE_SID}_check_monitor_log.mail
    echo "--------------------------------------------------------------">>/tmp/${ORACLE_SID}_check_monitor_log.mail
    echo " "
    echo " " >> /tmp/${ORACLE_SID}_check_monitor_log.mail
    echo " " >> /tmp/${ORACLE_SID}_check_monitor_log.mail
    cat /tmp/${ORACLE_SID}_check_monitor_log.log >> /tmp/${ORACLE_SID}_check_monitor_log.mail
    cat /tmp/${ORACLE_SID}_check_monitor_log.mail | mailx -m -s "on ${MACHINE}, MONITOR of Alert Log for ${ORACLE_SID} found errors" "
    |emailaddresshere|"
    mv ${ORIG_ALERT_LOG} ${TEMP_ALERT_LOG}
    cat ${TEMP_ALERT_LOG} >> ${NEW_ALERT_LOG}
    touch ${ORIG_ALERT_LOG}
    rm /tmp/${ORACLE_SID}_monitor_temp.txt 2> /dev/null
    rm /tmp/${ORACLE_SID}_check_monitor_log.log
    rm /tmp/${ORACLE_SID}_check_monitor_log.mail
    exit
    fi;
    rm /tmp/${ORACLE_SID}_check_monitor_log.log > /dev/null
    rm /tmp/${ORACLE_SID}_monitor_location.txt > /dev/null
    The referenced awk script (check_alert.awk). You can modify it as needed to add or remove things you wish to look for. The ERROR_AUDIT is a custom entry that a trigger on DB error writes in our environment.
    $0 ~ /Errors in file/ {print $0}
    $0 ~ /PMON: terminating instance due to error 600/ {print $0}
    $0 ~ /Started recovery/{print $0}
    $0 ~ /Archival required/{print $0}
    $0 ~ /Instance terminated/ {print $0}
    $0 ~ /Checkpoint not complete/ {print $0}
    $1 ~ /ORA-/ { print $0; flag=1 }
    $0 !~ /ORA-/ {if (flag==1){print $0; flag=0;print " "} }
    $0 ~ /ERROR_AUDIT/ {print $0}
    I simply put this script into cron to run every 5 minutes passing the SID of the DB I want to monitor.

    I have a PERL script that I wrote that does exactly what you want and I'll be glad to share that with you along with the CRON entries.
    The script runs opens the current alert_log and searches for key phrases and send e-mail if it finds anything. It then sleeps for 60 sec, wakes up and reads from were it left off to the bottom of the file, searching again and then sleeping. The only down side is it keeps a file handle open on the alert_log, so you have to kill this processes if you want to rename or delete the alert_log.
    My email in my profile is not hidden.
    Tom

  • Best Way to monitor standby, primary databases, including alert logs, etc.

    Hi, Guys, I finally cutover the new environment to the new linux redhat and everything working great so far (the primary/standby).
    Now I would like to setup monitoring scripts to monitor it automatically so I can let it run by itself.
    What is the best way?
    I talked to another dba friend outside of the company and he told me his shop not use any cron jobs to monitor, they use grid control.
    We have no grid control. I would like to see what is the best option here? should we setup grid control?
    And also for the meantime, I would appreciate any good ideas of any cronjob scripts.
    Thanks

    Hello;
    I came up with this which I run on the Primary daily, Since its SQL you can add any extras you need.
    SPOOL OFF
    CLEAR SCREEN
    SPOOL /tmp/quickaudit.lst
    PROMPT
    PROMPT -----------------------------------------------------------------------|
    PROMPT
    SET TERMOUT ON
    SET VERIFY OFF
    SET FEEDBACK ON
    PROMPT
    PROMPT Checking database name and archive mode
    PROMPT
    column NAME format A9
    column LOG_MODE format A12
    SELECT NAME,CREATED, LOG_MODE FROM V$DATABASE;
    PROMPT
    PROMPT -----------------------------------------------------------------------|
    PROMPT
    PROMPT
    PROMPT Checking Tablespace name and status
    PROMPT
    column TABLESPACE_NAME format a30
    column STATUS format a10
    set pagesize 400
    SELECT TABLESPACE_NAME, STATUS FROM DBA_TABLESPACES;
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    PROMPT
    PROMPT Checking free space in tablespaces
    PROMPT
    column tablespace_name format a30
    SELECT tablespace_name ,sum(bytes)/1024/1024 "MB Free" FROM dba_free_space WHERE
    tablespace_name <>'TEMP' GROUP BY tablespace_name;
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    PROMPT
    PROMPT Checking freespace by tablespace
    PROMPT
    column dummy noprint
    column  pct_used format 999.9       heading "%|Used"
    column  name    format a16      heading "Tablespace Name"
    column  bytes   format 9,999,999,999,999    heading "Total Bytes"
    column  used    format 99,999,999,999   heading "Used"
    column  free    format 999,999,999,999  heading "Free"
    break   on report
    compute sum of bytes on report
    compute sum of free on report
    compute sum of used on report
    set linesize 132
    set termout off
    select a.tablespace_name                                              name,
           b.tablespace_name                                              dummy,
           sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )      bytes,
           sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id ) -
           sum(a.bytes)/count( distinct b.file_id )              used,
           sum(a.bytes)/count( distinct b.file_id )                       free,
           100 * ( (sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )) -
                   (sum(a.bytes)/count( distinct b.file_id ) )) /
           (sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )) pct_used
    from sys.dba_free_space a, sys.dba_data_files b
    where a.tablespace_name = b.tablespace_name
    group by a.tablespace_name, b.tablespace_name;
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    PROMPT
    PROMPT Checking Size and usage in GB of Flash Recovery Area
    PROMPT
    SELECT
      ROUND((A.SPACE_LIMIT / 1024 / 1024 / 1024), 2) AS FLASH_IN_GB,
      ROUND((A.SPACE_USED / 1024 / 1024 / 1024), 2) AS FLASH_USED_IN_GB,
      ROUND((A.SPACE_RECLAIMABLE / 1024 / 1024 / 1024), 2) AS FLASH_RECLAIMABLE_GB,
      SUM(B.PERCENT_SPACE_USED)  AS PERCENT_OF_SPACE_USED
    FROM
      V$RECOVERY_FILE_DEST A,
      V$FLASH_RECOVERY_AREA_USAGE B
    GROUP BY
      SPACE_LIMIT,
      SPACE_USED ,
      SPACE_RECLAIMABLE ;
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    PROMPT
    PROMPT Checking free space In Flash Recovery Area
    PROMPT
    column FILE_TYPE format a20
    select * from v$flash_recovery_area_usage;
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    PROMPT
    PROMPT Checking last sequence in v$archived_log
    PROMPT
    clear screen
    set linesize 100
    column STANDBY format a20
    column applied format a10
    --select max(sequence#), applied from v$archived_log where applied = 'YES' group by applied;
    SELECT  name as STANDBY, SEQUENCE#, applied, completion_time from v$archived_log WHERE  DEST_ID = 2 AND NEXT_TIME > SYSDATE -1;
    prompt
    prompt----------------Last log on Primary--------------------------------------|
    prompt
    select max(sequence#) from v$archived_log where NEXT_TIME > sysdate -1;
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    PROMPT
    PROMPT Checking switchover status
    PROMPT
    select switchover_status from v$database;I run it from a shell script and email myself quickaudit.lst
    Alert logs are great source of information when you have an issue or just want to check something.
    Best Regards
    mseberg

  • Settinggs for Generic Alert Log Metric, OEM GC 10204

    OS: AIX Grid Control Version: 10204
    Agent:10204, Repository DB:10204
    This is the setting on a 9208 DB I was testing for Generic Alert Log Error Metric (I had to change [ (square bracket with { curly brackets on the post).
    Warning Metric: ORA-*
    Critical Metric: ORA-0*(60{0-9}|1157|1562|1628|1650|1653|1654|1655|1656|4031|7445|16014|29740){^0-9}
    The Warning metric (ORA-*) is set to a catch all else if not found in the critical metric. Not sure if there's an order the warning vs critical is read, but so far this has worked for our purposes.
    In GC 10204, we can add an ORA- error to the 'Alert Log Filter Expresion' and this would prevent a metric from being sent out if matched, so if there's a particular ORA-0600 error we do not want to be sent out as critical, we could add it to to the filter to be ignored. In the Advance Setting GC example , we want to ignore "ORA-00600: internal error code, arguments {qerfxFetch_01}, {}, {}, {}, {}, {}, {}" , so we would added it to the filter as ".*ORA-00600:.*\{qerfxFetch{^\}}*\}.*"
    My question - Instead of ignoring the error "ORA-00600: internal error code, arguments {qerfxFetch_01}, {}, {}, {}, {}, {}, {}", I want to move it to be a Warning, can anyone suggest any way of doing this? I've tried adding to the Warning metric {.*ORA-00600:.*\{qerfxFetch{^\}}*\}.*}|ORA-*, but this does not work, as the alert still comes out as a critical.
    All suggestions are welcome.

    Hi,
    You did not mention database version. in 11g, the generic alert log metric will not work. For 10g, you can set this from metrics and policy settings page bu setting warning and critical thresholds for this metric to "ORA-*". And then create a notification rule for this metric.
    For 11g, you need to check MOS note 949858.1
    Salman

  • Alert log monitoring problem

    Hi guys!
    I have found good simple script for alert log monitoring BUT it doesnt shows date and time. How to format it so that i could see date and time as well in log output?
    +#!/bin/sh+
    +#GLOBS+
    ALERT="ORA-";
    LOGFILE=/path/to/my/alert_X.log
    MYFILE=/home/user/test.log
    +##+
    +#get the errors out of the logfile.+
    grep -h "$ALERT" $LOGFILE >> $MYFILE
    +#count number of lines in myfile, and print.+
    +VAR=`wc -l $MYFILE | awk -F" " '{print $1}'`+
    +#echo $VAR+
    +# if the amount of lines is greater than 0, then cat the file and send it to me. if not then echo all clear.+
    +#size variable is the number of errors the last time the script ran+
    +size=`wc -l test.last | awk -F" " '{print $1}'`+
    echo $size
    +# if the amount of lines is greater than 0, then cat the file and send it to me. if not then echo all clear+
    +if [[ $VAR -gt $size ]] ; then+
    cat $MYFILE | mail -vs "oralert" [email protected] ;
    else
    echo "All clear.."
    fi;
    rm test.last
    mv test.log test.last
    touch test.log

    The alert_log is know to first put the date of the message into it, and then on the next line the ORA- error message.
    So in the case you would find an ORA-error here, then what is the problem into going into the file and start looking at what time it occured.
    Otherwise you would have to modify the script in such way that it will get more info than a 'grep' at the moment it finds the error, like using "grep -l" option, that simply matches the lines.
    Then a while loop in the script could "walk" trough these lines and get the surrounding lines around that line number from the alert_log.
    But, again, if an error pops up, you do want to go into the alert-file, looking up all given info e.g. about the object(s) involved, the users, if a tracefile was generated...etc,etc,.
    FJFranken

  • Generic Alert log metric

    I'm trying to figure out how to setup the generic alert log metric to run a corrective action based on a warning .
    So when i try to work with the generic alert log metric .
    it provides a time/line number which has an all others with a warning and a critical .
    if i tried to add a new line with a % in the time/line number and warning expression it wont let me add it .
    what am i doing wrong here . Obviously since this is the alert log i will not know the time or line number of when i will recieve this error unless i'm reading something wrong here.

    if i tried to add a new line with a % in the time/line number and warning expression it wont let me add it . Try "%" (in quotes)

  • Alert log monitoring

    Hi guys is there any kind of free utility or script which could send me peice of last alert log error produced by remote Oracle database?
    I need something similar to OraSentry utility....
    Just to say my 10g database work on Win platform.
    Thank you!

    Here's a script I use for our 9i databases.
    # Set environment
    . $HOME/.profile
    # get a list of all Oracle DB's running and check their alert log for errors
    # The 'end of monitoring' string is added to the end of the alert log after each run
    # and only the messages after that are processed. Used so we don't double-check
    # the same messages.
    for SID in `ps -ef | grep pmon | grep -v grep | awk '{print $NF}' | sed 's/_/ /g' | awk '{print $3}'`
    do
    export ALERT_LOG=$ORACLE_BASE/admin/$SID/bdump/alert_$SID.log
    export LASTLINE=`tail -1 $ALERT_LOG | cut -c1-5`
    if [ "$LASTLINE" != "#####" ]; then
    sed '/##### end of monitoring #####/,$ !d' $ALERT_LOG > /tmp/work.tmp
    grep ORA- /tmp/work.tmp
    if [ $? -eq 0 ]; then
    mailx -s "Errors found in $SID alert log" [email protected] < /tmp/work.tmp
    fi
    sed '/##### end of monitoring #####/d' $ALERT_LOG > $ALERT_LOG.work
    mv $ALERT_LOG.work $ALERT_LOG
    echo "##### end of monitoring #####" >> $ALERT_LOG
    fi
    done
    rm /tmp/work.tmp
    Start off by inserting a comment at the end of the alert log. I use ##### end of monitoring #####
    Next the script will check to see if that is the last line in the alert log. If it is then nothing has been written to the alert log since the last time the script was run...
    If there is something, the script grabs everything after the '##### end of monitoring #####' and checks if it includes errors.
    If it does it emails them to the dba. If not (ie: just informational messages) then it appends the '##### end of monitoring #####' line to the end of the alert log for the next run.
    Edited by: Jamie CC on Jun 4, 2010 6:43 AM

  • Create report to get lat 30days Metric alert & Alert log errors Grid

    We would like to create a report to display last 30 day's mertric alert and alert log errros in EM Grid. How we can do it?

    DBMS Direct,
    But in the post How to be notified for all ORA- Errors recorded in the alert.log file
    11iuser complain about that why he/she just get error number without any explain of arrised error.
    In my situation I just get "distinct types of ORA- errors" without even any error code.
    Perhaps I need to change something in emoms.properties or emd.properties.
    By the way I select Message format -- Long Format
    Sorry for my poor English

  • Need to find the way to get the actual error message in the alert log.

    Hi,
    I have configured OEM 11G and monitoring target versions are from 9i to 11g. Now my problem is i have defined the metrics for monitoring the alert log contents and OEM is sending alert if there is any error in the alert log but it is not showing the actual error message just it is showing as below.
    ============================
    Target Name=IDMPRD
    Target type=Database Instance
    Host=oidmprd01.ho.abc.com
    Occurred At=Dec 21, 2011 12:05:21 AM GMT+03:00
    Message=1 distinct types of ORA- errors have been found in the alert log.
    Metric=Generic Alert Log Error Status
    Metric value=1
    Severity=Warning
    Acknowledged=No
    Notification Rule Name=RULE_4_PROD_DATABASES
    Notification Rule Owner=SYSMAN
    ============================
    Is there any way to get the complete error details in the OEM alert itself.
    Regards
    DBA.

    You need to look at the Alert Log error messages, not the "status" messages. See doc http://docs.oracle.com/cd/E11857_01/em.111/e16285/oracle_database.htm#autoId2

Maybe you are looking for

  • How to create workflow to move document from site to its subsite

    Hi All, I need suggestion on share point workflow development. Currently I am working on Share Point 2013. I have root site and its sub-sites. Following is the challenge: 1. I have to move document from "Document Library" of root site to one of its s

  • Flash fails on FF and i'm getting pissed off, it is a constant, flash stated 'get another browser' how to resolve?

    This is really beginning to get to me flash has crashed 2 times today and once yesterday and atleast once a week going back as far as i can remember and i have just about had enough I checked flashes page and it told one customer to go to another bro

  • Back up computer with a hard drive

    I just got the new Mac Box Set and to install it safely I want to back up my original software on a hard drive. The problem is I haveno idea how to go about this. Any suggestions would be greatly appreated.

  • Running PHP content

    Hi all, I want to run some php content using my web server. What do I have to do to enable that (except enabling the php module in the web server setting)? Is there somewhere a document I can read regarding enabling the php server? Thanks, Ziv

  • Send and recieve MIDI

    I've been working on a project for quite awhile now... Started with a GM MIDI track for my Synth. After I recorded my synth to audio I then changed the GM MIDI track to an Audio Inst. track, to use the Garage band 'Stings' instrument instead. Anyway,