Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Is it possible that i can monitor . kernel log messages , apache error logs , mail log messages via nagios.

I have three linux servers and i want that on every server there should be something so that i can see all log files from one locations

I am new to nagios so i don't know

share|improve this question
The first thing you need to do is define exactly what you mean by "monitor" log files. – John Gardeniers Aug 23 '10 at 3:59
up vote 3 down vote accepted

There's a whole category of Log Monitoring plugins over on the Nagios Exchange. The check_logfiles plugin looks promising. You should know, though, that there's no "magic" log monitoring plugin. You need to be able to tell the plugin what you're looking for (in the form of a regular expression) so that it can alert you when it finds a match.

share|improve this answer
Is nagios only monitors for some expression or is it possible with nagios that , when i click on log file , it then opens the current contents of that file. i just want to view the contents from one location – John Aug 23 '10 at 3:32
Oh, just viewing log files is really outside of what Nagios does. For that, you should first get all of your servers sending their logs to a central syslog server. Then from there, give php-syslog-ng a try: – EEAA Aug 23 '10 at 3:55

As was already pointed out, to monitor log files, you have to identify what it is you want.

Based on what I gather from your post, you want to monitor and alert on log files, and you also want to be able to view the content of the logs.

I'm going to presume when you say "view", you actually mean that when a problem is identified in a monitored log, you want the alert to show the offending lines or entries that triggered the alert.

If you had something else in mind when you said "view", you should know, it is completely inefficient to "monitor" logs the way you described. "viewing" isn't going to provide an efficient method of accomplishing what you want. You can't possibly expect to visually monitor several logs on different hosts, and catch an issue.

To monitor several logs on different hosts the right way, from one central location, its either you use splunk, logrobot, or the aforementioned check_logfiles (haven't really used this one but it may be worth checking out).

share|improve this answer

protected by Michael Hampton Jun 20 '14 at 1:29

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?