Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application in Linux which will log if there is any error in some particular format.

Is there any log-analysis or log-monitoring software in Linux which I can configure it according to my log format so that in case of an error it will send me a alert ?

share|improve this question
up vote 1 down vote accepted

One possibility would be to use syslog-ng (it's available for example in Debian, Ubuntu and Gentoo repositories, for RHEL there are downloads on syslog-ng homepage).

syslog-ng allows very flexible syslogging. In your case I would make it match for those errors and make that syslog-ng chain to send out an e-mail / log error to database / send out an SMS or whatever alert mechanism you use.

As a bonus that would be real-time alerting.

share|improve this answer
I love syslog-ng (it's the syslog daemon I use everywhere, given the choice, and I've been a happy user for over a decade now), but I wouldn't use it to do the actual monitoring. I'd have all the logs coming in to syslog-ng intially, yes, but then I'd dump them to a database or external file for the actual processing. That gives you a lot more flexibility, and the decoupling can improve performance, too. – Christopher Cashell Nov 10 '10 at 21:16

For a simple, standalone solution, swatch is designed to attach to the end of a logfile, watch for new lines, and act on them (send email, run scripts ,etc.) depending on the content of those new lines.

share|improve this answer
I've used swatch regularly in the past. If you need large scale log monitoring and analysis for a whole system, or for dozens of applications, swatch might not be a perfect choice. But, for keeping an eye on a few logs and looking for a handful of specific cases, it works great. – Christopher Cashell Nov 10 '10 at 21:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.