[Top][All Lists]

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

Re: Strategy for multi-distro .monitrc management?

From: Martin Pala
Subject: Re: Strategy for multi-distro .monitrc management?
Date: Fri, 13 Apr 2007 22:48:40 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070217 Iceape/1.0.8 (Debian-1.0.8-4)


although the proposed solution may simplify the support of portable configuration, i think it will be better to use for example the mentioned m4 for the creating monit configuration from common source for various distributions.

From my point of view, the distribution of portable/conditional configuration won't be advantage for the end user since he/she will see lot of unnecessary informations, which will make the configuration hard to read. The preprocessed configuration for monit distribution for particular platform may be simpler to read/manage on target platform.

It may be also needed to distribute different binaries for various platforms - due to the different prerequisite libraries for example (such as openssl when enabled). The preprocessing of the configuration may be automated using custom script when building monit.


i think the implementation of preprocessor in monit configuration parser is not needed and is out of project scope - simple existing tools may serve for portable package creation.

Thanks :)


Stephen Dowdy wrote:
I have to deploy monit on Debian, RHEL4, SuSE SLES9.  Unfortunately, each is
different enough that a single .monitrc won't work.  Specifically, as an
example, 'sshd' and 'ntpd' init.d scripts have different names across all
three distros.  (/etc/init.d/{x,}ntp{,d} /etc/init.d/ssh{,d} ...)

It would be nice if monitrc had some simplistic preprocessor handling, like:

#ifdef RHEL4
include RHEL4/sshd
#else ifdef DEBIAN
include Debian/sshd

or if it supported variable expansion:

include ${DISTRO}/sshd

Additionally, for a logfile scanner, i look for "Out of Memory: Kill
process" messages, but the default syslog writes these in different places
on different distros, so my 'logscan' monitrc include snippet would benefit
from variable expansion or preprocessor conditionals, etc.

#ifdef RHEL4
#else ifdef DEBIAN

check file SYSLOGFILE with path ${syslogfile}

I could create a bunch of start/stop front-end scripts that did all the
conditional determination/processing themselves in /etc/opt/monit/init.d or
something, but that's also non-optimal.

Running the .monitrc through an m4 or cpp first-run might be workable, but
again, isn't as desireable as having built-in support in Monit to do this.

I would prefer to have to manage a SINGLE .monitrc and tree full of includes
than to have to track modifications across distro-specific .monitrcs.

Does anyone have any good ideas on this issue or anecdotes on how they
manage this problem?


reply via email to

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