Home Directory Plugins Log Files check all log files linux/sunos solaris/hpux/aix/unix

check all log files linux/sunos solaris/hpux/aix/unix

Bookmark and Share

Current Version
Latest
Last Release Date
2013-03-01
Compatible With
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
E-mail
License
Other
Hits
5262
check all log files linux/sunos solaris/hpux/aix/unix
Scan / Monitor log files for user-defined entries & EXCLUDE specific lines from the results

Case Scenario:

Within the last 30 minutes, find out how many lines in the log file [ /var/log/app.log ] contain both entries of "ERROR" and "Client". If any lines are found containing these two strings (ERROR.*Client), take note of that.

From the list of lines found, see if there are any lines that also contain the keywords "error 404" OR "updateNumber". If there are, remove them from the list. After removing them, show me what is left. If the number of lines left is between 5 and 9, alert as WARNING. If equal to or over 10, alert as CRITICAL. If below 5, no issues to report!

Command:

logrobot autofig /var/log/app.log 30 ‘ERROR.*Client’ '(error 404|updateNumber)' 5 10 -show