Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
./check_log.sh
Current Version
2
Last Release Date
2011-06-20
Owner
felipeferreira
Website
http://felipeferreira.net/?p=1038
Download URL
http://www.xoroz.com/files/scripts/nagios/check_log.sh.txt
Compatible With
Often I needed to check log files for a keyword. So I wrote a simple bash script to do that plus integrate with nagios and perfdata so it also generate graphic. The script is based on tail -f and grep on the logfile with nohup command, like: nohup tail -f $LOG_FILE |grep --line-buffered "$VAR" > "$TMP" &
I recommend calling the check each 5 minutes.
Example usage: ./check_log.sh <warning> <critical> <keyword> <logfile>
You must be logged in to submit a review.
To:
From: