diff --git a/Bundler/gunicorn.xml b/Bundler/gunicorn.xml
new file mode 100644
index 0000000..0955ec3
--- /dev/null
+++ b/Bundler/gunicorn.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/Metadata/groups.xml b/Metadata/groups.xml
index 59fe5cb..647f735 100644
--- a/Metadata/groups.xml
+++ b/Metadata/groups.xml
@@ -766,17 +766,27 @@
+
+
+
+
+
+
+
diff --git a/Probes/gunicorn-debian b/Probes/gunicorn-debian
new file mode 100755
index 0000000..a85a698
--- /dev/null
+++ b/Probes/gunicorn-debian
@@ -0,0 +1,3 @@
+#!/bin/bash
+# Liste les sites configures pour gunicorn (pour monitoring par ex)
+ls /etc/gunicorn.d 2> /dev/null
diff --git a/Python/etc/monit/services b/Python/etc/monit/services
index 83af860..347a475 100644
--- a/Python/etc/monit/services
+++ b/Python/etc/monit/services
@@ -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"