Looks interesting ... what do you think?
We should probably support the event severity. I'm +1 to add it to
the monit TODO list (Wouter's help with the implementation could be
great :)
Martin
-------- Original Message --------
Subject: Bug#353758: monit: suboptimal logging reduces usefulness
Resent-Date: Mon, 20 Feb 2006 18:04:00 UTC, Mon, 20 Feb 2006
10:04:03 -0800
Resent-From: Wouter Verhelst <address@hidden>
Resent-To: address@hidden
Resent-CC: Stefan Alfredsson <address@hidden>
Date: Mon, 20 Feb 2006 10:59:58 +0100
From: Wouter Verhelst <address@hidden>
Reply-To: Wouter Verhelst <address@hidden>, address@hidden
To: Debian Bug Tracking System <address@hidden>
Package: monit
Version: 1:4.6-1
Severity: important
Tags: patch
Hi,
Monit has the ability to log events to syslog. For a monitoring
utility,
this is very useful -- but monit logs everything at level LOG_ERR, so
critical messages about services that failed or were lost are
intermixed
with debugging messages about the monit service starting up or even
checking whether something is still running.
I'm currently configuring a cluster where monitoring is done through a
third-party service which has the ability to create events from syslog
messages. To reduce event clutter, however, we want to make sure that
nonimportant messages are not logged as events; the fact that monit
logs
everything at the same level isn't very helpful for that.
I'm attaching a quick-and-dirty patch which applies to monit-4.5 as it
is in sarge, and which is the version that I'm currently using on this
cluster. It's ugly, but it does what I needed it to do and was all I
could come up with in the short timeframe that was given for this
project. I know that's not very helpful; however, if upstream is
interested, I'd be happy to help clean it up and provide a more robust
method to differentiate log levels.
All that being said, I question some bits of the code...:
log("%s: Error opening the log file '%s' for writing -- %s\n",
prog, Run.logfile, STRERROR);
If opening the log file failed, presumably so will writing to it.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15.4
Locale: address@hidden, address@hidden
(charmap=UTF-8)
Versions of packages monit depends on:
ii libc6 2.3.6-1 GNU C Library: Shared
libraries an
ii libssl0.9.8 0.9.8a-7 SSL shared libraries
monit recommends no packages.
-- no debconf information
--
Fun will now commence
-- Seven Of Nine, "Ashes to Ashes", stardate 53679.4