Thanks for the files :) The problem is fixed in the CVS now.
It was caused by the special case where two joined include files formed
one configuration rule. It was caused for example in this case:
unicorn:/etc# cat monit.d/infobot monit.d/dovecot
--8<--
check process infobot with pidfile /var/run/infobot.pid
start program "/etc/init.d/flooterbuck start"
stop program "/etc/init.d/flooterbuck stop"
if 5 restarts within 5 cycles then timeout
depends on ircd
check process dovecot with pidfile /var/run/dovecot/master.pid
group dovecot-imap
start program = "/etc/init.d/dovecot start"
stop program = "/etc/init.d/dovecot stop"
if failed host foo.bar port 143 type TCP protocol IMAP
then restart
if 5 restarts within 5 cycles then timeout
depends on dovecot_bin
...
--8<--
As you can see, although the infobot and dovecot configurations are
standalone, the joined text is not valid since the parser kept the
"depends on ..." state of the 'infobot' even when parsing the 'dovecot'.
This created the following rule in the parser stack:
depends on ircd check process ...
which is not correct.
Monit now presents the particular include files as standalone statements
so the above example is parsed correctly now.
Thanks :)
Martin
Mike Pepe wrote:
Hi Martin,
OK, here's a tar of the actual files.
I edited them with nano. I checked for non-printing characters and
didn't find any. Not sure what happened.
Thanks
-Mike
Martin Pala wrote:
Mike Pepe wrote:
Martin Pala wrote:
... what monit version is used? Can you send the configuration files?
Martin
Hi Martin, it's 4.7, and the config file looks like this:
(comments removed for clarity)
set daemon 60
set logfile syslog facility log_daemon
set mailserver mail.doki-doki.net, localhost
set httpd port 6502 and
allow localhost # allow localhost to connect to the
server and
allow home.doki-doki.net
allow admin:monit # require user 'admin' with password
'monit'
check system quadzilla.doki-doki.net
if loadavg (1min) > 8 then alert
if loadavg (5min) > 4 then alert
include /etc/monit.d/*
in monit.d I put all the services as separate entries, as in this sample
check process dovecot with pidfile /var/run/dovecot/master.pid
start program = "/etc/init.d/dovecot start"
stop program = "/etc/init.d/dovecot stop"
if failed host mail.doki-doki.net port 143 type TCP protocol IMAP
then restart
if 5 restarts within 5 cycles then timeout
it ran before I took out the lockfile check and dependencies, now I
get those syntax errors
/etc/monit.d/dovecot:1: Error: syntax error 'process'
The transcript looks good ... the copy of the control files (e.g. tar)
could help to find the problem (there may be some special case ... for
example in the past there was problem with parsing the include files
in CRLF format).
Martin
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general