Search the string in the active log and send mail


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Search the string in the active log and send mail
# 1  
Old 05-13-2014
Search the string in the active log and send mail

Hello,

I wanted to search specific string in the acitve log file and send an email if the search string found in the log.

Log file is written by application all the time. So, script has to search if any new log entry has the specific string for example " sample exception" and send an email.
# 2  
Old 05-13-2014
There are lots of threads with the similar topic. Please use search.


Also see "More UNIX and Linux Forum Topics You Might Find Helpful" section at the bottom of this page which contains :


Search string and send email
Search a string and send the line containing it
monitor log entries and send e-mail
Search for string and send mail
send mail once string is seen
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. UNIX for Dummies Questions & Answers

Search string and send email

Hi All, I need script which should search for the "reason code" and it should send mail with its preceding line as well as the line below it.(first line before it and line after it) I used below script but it is printing the whole lines inside it, your help is appreciated: cd... (3 Replies)
Discussion started by: rockingvj
3 Replies

3. Shell Programming and Scripting

Search a string and send the line containing it

Folks, Need a script which searches for a string and send line containing the string to the mail. The requirement is like this : file abc.log containts below text : "error occurred due to the code 3456 and kill the process to recover it" 1. search for string "3456" and send entire... (14 Replies)
Discussion started by: rockingvj
14 Replies

4. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

5. Homework & Coursework Questions

monitor log entries and send e-mail

I am stuck and worried. My assignment was due a day ago and I was too busy completing other assignments due during the same time. I worry that not completing this assignment will fail me. Need urgent help in completing the script asap. I dont want to sound pushy to get the answer but just wanted to... (10 Replies)
Discussion started by: vin8465
10 Replies

6. Emergency UNIX and Linux Support

monitor log entries and send e-mail

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! I am stuck and worried. My assignment was due a day ago and I was too busy completing other assignments due during the same time. I worry that not completing this assignment... (1 Reply)
Discussion started by: vin8465
1 Replies

7. Shell Programming and Scripting

Search for string and send mail

Hi, I need to find if there is any error in the last few lines of the log file and send a mail accordingly.For example, Following errors can be logged in the log file. ERR_1="DB Connection not established" ERR_2="Server Unloading" I need to find if these errors are found in the log file and... (1 Reply)
Discussion started by: AnneAnne
1 Replies

8. Shell Programming and Scripting

search a string and mail it as attachment

Hi All, I need to search a text in a string, assign it to a variable. Ex : I need to get the number that has gif extension. The number is not constant. The search value should return as 1174499845 from the following string. x 1174499845.gif, 133982 bytes, 262 tape blocks Go to... (3 Replies)
Discussion started by: jagadeeshtata
3 Replies

9. Shell Programming and Scripting

send mail once string is seen

I need to write a script that when it sees the following string in a log file, it emails a group of people SQLException: ORA-12157: TNS:internal network communication error im a newb to scripting, any ideas would be appreciated (14 Replies)
Discussion started by: csaunders
14 Replies

10. UNIX for Dummies Questions & Answers

using mailx to send a log file to my outlook e-mail account

I like to use mailx -s to send an entire xxxxx.log to my outlook e-mail account. Any help will be appreciated. Thanks. (6 Replies)
Discussion started by: simt
6 Replies
Login or Register to Ask a Question