Linux log monitor shell script

Status
Not open for further replies.

arunganga

Apprentice
Hi Guys,

i have requirement for log monitor shell script as per below
a)grep WARNING or EXCEPTION or SEVERE from log file
b) count the grep results
c)send an email notification for grep results

please help me .

thanks,
Arun
 
I'm guessing you need to create a script that will look for WARNING, EXCEPTION, and SEVERE keywords in the log file, count them, and send an email. I would use the grep command with the > operator and store each occurence of these words in a file. Then I would use the nl command to count the lines of that file. And then use sendmail to send email.

Here you have some links:
nl command
sendmail
 
Status
Not open for further replies.