[monit] début de monitoring de gunicorn
Thx to gunicorn-debian et ses fichiers de confs/initscripts bien foutus. Pour l'instant seuls o2 et routeur sont monitorés. Reste à intégrer niomniom lorsqu'il sera migré sur wheezy.
This commit is contained in:
parent
26116973ab
commit
45114d90f5
4 changed files with 31 additions and 6 deletions
|
@ -52,6 +52,21 @@ service("apache",
|
|||
|
||||
service('nginx')
|
||||
|
||||
if has('gunicorn'):
|
||||
# on utilise le prob gunicorn-debian, qui liste les sites actifs sur
|
||||
# /etc/gunicorn.d/
|
||||
re_ignore = re.compile(r'(^_|\.(dpkg-(old|dist|new|tmp)|example)$|\.pyc|\.comc$)')
|
||||
for site in metadata.Probes["gunicorn-debian"].splitlines():
|
||||
site = site.strip()
|
||||
if re_ignore.search(site):
|
||||
continue
|
||||
service(None,
|
||||
name="gunicorn_%s" % site,
|
||||
start_cmd = "/etc/init.d/gunicorn start %s" % site,
|
||||
stop_cmd = "/etc/init.d/gunicorn stop %s" % site,
|
||||
pidf = "gunicorn/%s" % site,
|
||||
)
|
||||
|
||||
service("at",
|
||||
init="atd",
|
||||
pidf="atd")
|
||||
|
@ -234,12 +249,6 @@ for i in range(0,dernierecarte):
|
|||
@
|
||||
|
||||
if hostname in ['routeur']:
|
||||
@# gunicorn
|
||||
@check process gunicorn with pidfile /var/run/gunicorn/blacklist.pid
|
||||
@ start program = "/etc/init.d/gunicorn start"
|
||||
@ stop program = "/etc/init.d/gunicorn stop"
|
||||
@ if 5 restarts within 5 cycles then timeout
|
||||
@
|
||||
@# igmpproxy
|
||||
@check process igmpproxy with pidfile /var/run/igmpproxy.pid
|
||||
@ start program = "/etc/init.d/igmpproxy start"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue