monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to include multiple lines of matched content in an alert message


From: Callum Macdonald
Subject: Re: How to include multiple lines of matched content in an alert message?
Date: Sun, 03 Feb 2013 22:49:00 +0700

I don't think monit can do that natively for you. However, you could
whip up some kind of script to do that and monitor / trigger it with
monit. Not ideal, but I think it's the only monit option. - C

On Sun, 2013-02-03 at 17:14 +0400, Dmitry Dzhus wrote:
> A certain program runs on my machine on a regular basis, writing
> several messages into a log file /var/log/foo.log:
> 
> Feb  3 16:04:10 lehost foo[25293]: > Starting up
> Feb  3 16:04:10 lehost foo[25293]: > Current working directory is 
> /home/dzhus/foo
> Feb  3 16:04:10 lehost foo[25293]: > Successfully performed 6 out of 12 
> conversions
> Feb  3 16:04:10 lehost foo[25293]: > Failed on [14321, 4215, 23591]
> Feb  3 16:04:10 lehost foo[25293]: > Powering down
> 
> Is it possible to make monit send me the whole set of messages between 
> «Starting up»
> and «Powering down» in a *single* alert?
> 
> File contents check can only match a single line of a file.
> Alerts generated by file size checks do not include new content in alert 
> description at all.
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general





reply via email to

[Prev in Thread] Current Thread [Next in Thread]