I use Nagios as a monitoring tool, and i want to monitor a logfile. For that i use check_logfiles.
The logfile is on a Windows Machine, and i use NSClient++ / check_nrpe as an interface between windows and Nagios. Problem is that the logfile is big (with stacktrace). When a error occurs i get half a line in Nagios.
My goal is that when an error occurs i get an email with the error in it (and stacktrace etc), but only from the error occured.
My thoughts on this is to use check_logfiles scripting ability to search the logfile using the output of the check_logfile (half line) and do a grep til the end of the file, and mail it.
I find it a little complex, are there better ways to mail the entry of the logfile when something happens?
Thanks in advance