[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit] using monit with fail2ban
From: |
Charles Mangin |
Subject: |
[monit] using monit with fail2ban |
Date: |
Sun, 14 Sep 2008 13:55:58 -0400 |
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:30:25 foo monit[24122]: 'fail2ban' process is not running
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?
charles mangin | Alpha Geek and Chief Mental Hygienist
address@hidden
http://mentalhygiene.com