Feb 14, 2012
tom

Use Nagios to monitor a log file and send log details

Question

I know Nagios can monitor and alert on the content within a log file, but does anyone know of a plug-in, or other tool, that will monitor a log file for a particular string and then send the entire line in an email message where that match occured?

Asked by af-at-work

Answer

The stock check_log plugins is sort of… miserable; it uses ‘diff’ and processes the entire log, every time you run it, so it doesn’t scale well. At all.

ConSol Labs maintains an excellent log checking plugin that does exactly what you want:
http://exchange.nagios.org/directory/Plugins/Log-Files/check_logfiles/details

It is listed on Nagios Exchange, but here is the direct link to the English version:
http://labs.consol.de/lang/en/nagios/check_logfiles/

You have to run this through NRPE, or check_via_ssh (+ ssh keys), obviously.

Answered by Keith

Related posts:

  1. How to monitor log files via Nagios
  2. Monitor ssh on non-default port with Nagios
  3. Nagios log check plugin that doesn’t use diff
  4. How to monitor SQL Server backups with Nagios?
  5. How to use nagios to monitor a printer

Leave a comment