Operating System - HP-UX
1847123 Members
5495 Online
110263 Solutions
New Discussion

Re: Mailing errors appended to syslog

 
SOLVED
Go to solution
kenny chia
Regular Advisor

Mailing errors appended to syslog

Hi
In order to monitor errors written to the syslog file, I've decided to write a cron job that greps words like "error" and "CRITICAL" in the syslog file and mailing them to me.

Should I include more words other than the two? Or is there a better way of notifiying me of errors or problems? thanks
All Your Bases Are Belong To Us!
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: Mailing errors appended to syslog

look into

http://www.bb4.com/

it's rather cheap!

live free or die
harry
Live Free or Die
Rajeev  Shukla
Honored Contributor

Re: Mailing errors appended to syslog

You might even grep for "Error" coz a lot of messages start with capital "E"

Rajeev
avsrini
Trusted Contributor
Solution

Re: Mailing errors appended to syslog

Hi,
You can use a script to grep for error and critical from syslog file and mail you.

also check syslog.conf file, you can make syslog to send the error and critical messages to other file also.
So you can just mail that file only to you.

If your application supports, set it to send alerts to your mail id directly. Like we have omniback configured to send mails to us incase of any alerts.

Happy Monitoring
Srini.
Be on top.
S.K. Chan
Honored Contributor

Re: Mailing errors appended to syslog

Kind of similar discussion here in this thread.I've mentioned in that thread about having too many keywords search that simply impossible to be able to grep them all.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x21ee56bd90a9d611abdb0090277a778c,00.html
Hope this helps ..
Trever Furnish
Regular Advisor

Re: Mailing errors appended to syslog

You've got the approach backwards - you can't possibly predict what error messages you may get, so you should instead filter out the things you know *aren't* error messages.

Of course you'll still have to be fairly specific to make sure that you don't accidentally ignore something you need to know about, but that's not that difficult since you have logs to build your patterns from.

The idea is that when nothing unusual is happening, you don't get any error reports, but when something unexpected happens (ie a line you haven't told the script to ignore), you get a report on it.

Logwatch (http://www.logwatch.org) works that way and swatch can work that way as well. There are tons of log handling tools listed here as well:
http://www.counterpane.com/log-analysis.html
Hockey PUX?