monit-general
[Top][All Lists]
Advanced

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

Re: monit alerts sent to a log rather than email?


From: Callum Macdonald
Subject: Re: monit alerts sent to a log rather than email?
Date: Wed, 5 Jun 2013 20:16:49 +0200

You might be able to use the M/Monit interface to push events into a log file 
somehow. I'm not certain how it would work exactly, but it seems worth checking 
out.

It might also be worth looking at the monit log file if you're already using 
log file aggregation. We use papertrail to aggregate logs (syslog and their 
remote_syslog app which might help). I think every time an error fires, it hits 
the monit log. So if you're going to have to parse the emails to generate 
alerts, it's maybe the same task in a different way.

I just had a quick look, and the monit log appears to contain one entry for 
every error. I guess you can't turn off alerts, so you'll get a message on 
every single failure (one every cycle) rather than one per change of state. But 
for example, if monit is restarted, it resends all the alerts for any checks 
which are still failing.

Best of luck - Callum.

On 5 Jun 2013, at 20:02, Chris Sanner <address@hidden> wrote:

> the main problem with email is that we aren't building a monitoring system 
> from the ground up - we want to incorporate monit into an existing suite.
> Right now that means nagios, which forwards alerts on via syslog
> Getting log messages into nagios is far easier than getting email into nagios.
> and yes - I want to avoid parsing the monit log as it stands because of the 
> ability for monit to dedupe things as it goes
> 
> 
> On Wed, Jun 5, 2013 at 1:44 PM, Noel <address@hidden> wrote:
> On 6/5/2013 11:29 AM, Chris Sanner wrote:
> > Can I have monit alerts written out to a log file instead of sent
> > in an email?
> 
> I don't believe there's an option to send only alerts to a separate
> log file.  I suppose you could not set any alerts (or suppress all
> alerts) and parse the monit log file for interesting entries, but
> that seems like a lot of duplicated effort as there will likely be
> lots of entries you don't want to be notified about.
> 
> >
> > I already have monitoring systems that check log files, send
> > messages to places, etc, but I don't have outbound email
> > configured on these systems and don't want to have that headache.
> 
> monit doesn't require any mail software on the system it's running
> on.  A network accessible mail server anywhere will do fine.  It can
> also send to an alternate port if you like to firewall outgoing
> connections to port 25.
> 
> # monitrc
> ...
> set mailserver smtp.example.com   # primary, default to port 25
>                         smtp2.example.net port 11125  # fallback if
> primary unavailable
> 
> 
> 
>   -- Noel Jones
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 
> 
> -- 
> __
> Chris Sanner
> 571-249-2676
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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