Sponsored Content
Full Discussion: Online log monitoring script
Top Forums Shell Programming and Scripting Online log monitoring script Post 302607337 by codemaniac on Wednesday 14th of March 2012 07:17:36 AM
Old 03-14-2012
Quote:
Originally Posted by hishanms
#!/bin/bash

tail /oracle/app/admin/ABC/bdump/alert_ABC.log >> tempoutput&


Error=`egrep 'error|warn|critical|fail|ORA-1683' tempoutput`

echo "$Error" |mailx -s "ABC Error " ABCD@domain.lk

cat /dev/null > tempoutput

I wrote this script and put in to cronjob every 5 min.
so every 5 min i got the empty e-mail. That's not i wont.
i wont to if getting those "error|warn|critical|fail|ORA-1683" things , genarate the mail.( Execute this "mailx -s "ABC Error " ABCD@domain.lk" )

any one can help me...
Thanks.
Try to fire mailx only when $Error is not null

Code:
if [[ -z $Error ]]
echo "$Error" |mailx -s "ABC Error" ABCD@domain.lk 
fi

 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Online log

Hi, I have this situation: There is an online.log to which one app is continuously writing. This app is 24*7. This log will fill up our File system pretty quickly. Such that I need to take backups of that file for safekeeping without stopping the App. These backups I can move to another... (5 Replies)
Discussion started by: chaandana
5 Replies

2. Shell Programming and Scripting

help needed - log file monitoring script

hi Gurus, Need to pick your brains on this minor script project. I would like to continuously monitor a log file with sample log messages as below, and if PSOldGen percentage is either 99% or 100% for consecutively 10 times, alert someone. {Heap before gc invocations=46516: PSYoungGen ... (6 Replies)
Discussion started by: kenchen722
6 Replies

3. Shell Programming and Scripting

Log folder size monitoring script

Hi All, Can anyone refer to me a readymade script for the purpose of log folder size monitoring script. Example : I have a log folder of size 10 G, and as the logs keep accumulating the folder gets full and i have to manually zip/remove the files in order to keep the server running. Something... (1 Reply)
Discussion started by: findjai
1 Replies

4. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

5. Shell Programming and Scripting

Monitoring script for a log file

Hi, I need to get a script working to monitor a log file and throw an alert via mailx as soon as a particular error is encountered. I do not want repeatative email notifications of same error so simply cat logfile and grepping the error would not work. Here is what i planned but it seems... (2 Replies)
Discussion started by: roshan.171188
2 Replies

6. UNIX for Beginners Questions & Answers

Monitoring script for Log file

Hi, Iam new to unix , plz help me to write below script. I need to write a script for Monitoring log file when any error occurs it has to send a mail to specified users and it should be always pick latest error not the existing one and the script should be able to send mail all errors (more... (1 Reply)
Discussion started by: vij05
1 Replies

7. UNIX for Beginners Questions & Answers

Shell script for continuously monitoring log file

Hi I have written below log monitoring script to egrep multiple words and redirect the output to a text file and its working fine but I want to add some more below given functionality to it, which is very advance and im not very good in it, so please help if you can :) I am egrepping all the... (1 Reply)
Discussion started by: scazed
1 Replies
GSI GSS Assist Constants(3)					 globus gss assist				       GSI GSS Assist Constants(3)

NAME
GSI GSS Assist Constants - Enumerations enum globus_gsi_gss_assist_error_t { GLOBUS_GSI_GSS_ASSIST_ERROR_SUCCESS = 0, GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_ARGUMENTS = 1, GLOBUS_GSI_GSS_ASSIST_ERROR_USER_ID_DOESNT_MATCH = 2, GLOBUS_GSI_GSS_ASSIST_ERROR_IN_GRIDMAP_NO_USER_ENTRY = 3, GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_GRIDMAP = 4, GLOBUS_GSI_GSS_ASSIST_ERROR_INVALID_GRIDMAP_FORMAT = 5, GLOBUS_GSI_GSS_ASSIST_ERROR_ERRNO = 6, GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_INIT = 7, GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_WRAP = 8, GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_TOKEN = 9, GLOBUS_GSI_GSS_ASSIST_ERROR_EXPORTING_CONTEXT = 10, GLOBUS_GSI_GSS_ASSIST_ERROR_IMPORTING_CONTEXT = 11, GLOBUS_GSI_GSS_ASSIST_ERROR_INITIALIZING_CALLOUT_HANDLE = 12, GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_CALLOUT_CONFIG = 13, GLOBUS_GSI_GSS_ASSIST_CALLOUT_ERROR = 14, GLOBUS_GSI_GSS_ASSIST_GSSAPI_ERROR = 15, GLOBUS_GSI_GSS_ASSIST_GRIDMAP_LOOKUP_FAILED = 16, GLOBUS_GSI_GSS_ASSIST_BUFFER_TOO_SMALL = 17, GLOBUS_GSI_GSS_ASSIST_ERROR_CANONICALIZING_HOSTNAME = 18 } Enumeration Type Documentation enum globus_gsi_gss_assist_error_t GSI GSS Assist Error codes. Enumerator: GLOBUS_GSI_GSS_ASSIST_ERROR_SUCCESS Success. GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_ARGUMENTS No user entry in gridmap file. GLOBUS_GSI_GSS_ASSIST_ERROR_USER_ID_DOESNT_MATCH Error user ID doesn't match. GLOBUS_GSI_GSS_ASSIST_ERROR_IN_GRIDMAP_NO_USER_ENTRY Error with arguments passed to function. GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_GRIDMAP Error querying gridmap file. GLOBUS_GSI_GSS_ASSIST_ERROR_INVALID_GRIDMAP_FORMAT Invalid gridmap file format. GLOBUS_GSI_GSS_ASSIST_ERROR_ERRNO System Error. GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_INIT Error during context initialization. GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_WRAP Error during message wrap. GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_TOKEN Error with token. GLOBUS_GSI_GSS_ASSIST_ERROR_EXPORTING_CONTEXT Error exporting context. GLOBUS_GSI_GSS_ASSIST_ERROR_IMPORTING_CONTEXT Error importing context. GLOBUS_GSI_GSS_ASSIST_ERROR_INITIALIZING_CALLOUT_HANDLE Error initializing callout handle. GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_CALLOUT_CONFIG Error reading callout configuration. GLOBUS_GSI_GSS_ASSIST_CALLOUT_ERROR Error invoking callout. GLOBUS_GSI_GSS_ASSIST_GSSAPI_ERROR A GSSAPI returned an error. GLOBUS_GSI_GSS_ASSIST_GRIDMAP_LOOKUP_FAILED Gridmap lookup failure. GLOBUS_GSI_GSS_ASSIST_BUFFER_TOO_SMALL Caller provided insufficient buffer space for local identity. GLOBUS_GSI_GSS_ASSIST_ERROR_CANONICALIZING_HOSTNAME Failed to obtain canonical host name. Author Generated automatically by Doxygen for globus gss assist from the source code. Version 8.5 Mon Apr 30 2012 GSI GSS Assist Constants(3)
All times are GMT -4. The time now is 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy