I suggest that the problem is related to the highly restricted path that monit uses, monit itself appears to be working correctly.
suggest you go through /etc/init.d/fail2ban and make sure all paths are absolute paths that don't rely upon external variables
2008/9/8 Charles Mangin
<address@hidden>
i'm trying to keep fail2ban (http://www.fail2ban.org/) monitored on my fedora server.
i've tried using a config like this:
check process fail2ban with pidfile /var/run/fail2ban.pid
start program = "/etc/init.d/fail2ban start"
stop program = "/etc/init.d/fail2ban stop"
if failed unixsocket /var/run/fail2ban/fail2ban.sock then restart
if 5 restarts within 5 cycles then timeout
the problem i'm having is that there is no process called "fail2ban" to monitor. the process that fail2ban starts up under looks like this:
ps ax | grep fail2ban
20099 ? Sl 0:31 /usr/bin/python /usr/bin/fail2ban-server -b -s /var/run/fail2ban/fail2ban.sock -x
and my logs show this:
Sep 7 12:34:26 foo monit[24122]: 'fail2ban' trying to restart
Sep 7 12:34:26 foo monit[24122]: 'fail2ban' start: /etc/init.d/fail2ban
Sep 7 12:34:26 foo monit[24122]: 'fail2ban' failed to start
aha, i thought. it might be that i need to "check process fail2ban-server". but that didn't work, neither did "check process python" and i get an error checking on the process "/usr/bin/python" that processes shouldn't start with /
is there something in the docs that i'm missing? is there a way to check just that there's a process identified by the pid in the .pid file?
thanks.
charles mangin | Alpha Geek and Chief Mental Hygienist
address@hidden
http://mentalhygiene.com
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general