Mettre à jour procédure pour configurer zoom munin avec nginx
This commit is contained in:
parent
6959e149a9
commit
18b65362d8
|
@ -100,9 +100,9 @@ Pour que cela fonctionne il faut faire tourner un démon FastCGI et le script mu
|
||||||
|
|
||||||
Adapter les droits de `/var/log/munin/munin-cgi` :
|
Adapter les droits de `/var/log/munin/munin-cgi` :
|
||||||
|
|
||||||
~~~
|
~~~ { .bash }
|
||||||
# chown www-data:munin /var/log/munin/munin-cgi-*
|
chown www-data:munin /var/log/munin/munin-cgi-*
|
||||||
# chmod 660 /var/log/munin/munin-cgi-*
|
chmod 660 /var/log/munin/munin-cgi-*
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
De même pour `/etc/logrotate.d/munin`, section `/var/log/munin/munin-cgi-graph.log` :
|
De même pour `/etc/logrotate.d/munin`, section `/var/log/munin/munin-cgi-graph.log` :
|
||||||
|
@ -111,20 +111,16 @@ De même pour `/etc/logrotate.d/munin`, section `/var/log/munin/munin-cgi-graph.
|
||||||
create 660 www-data munin
|
create 660 www-data munin
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Démarrer le démon FastCGI avec `spawn-fcgi` (`apt install libcgi-fast-perl spawn-fcgi`) :
|
Installer les dépendances pour démarrer le démon :
|
||||||
|
|
||||||
~~~
|
~~~ { .bash }
|
||||||
spawn-fcgi -s /var/run/munin/spawn-fcgi-munin-graph.sock -U www-data -u munin -g munin /usr/lib/munin/cgi/munin-cgi-graph
|
apt install libcgi-fast-perl spawn-fcgi
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Si spawn-fcgi ne démarre pas mais renvoie `spawn-fcgi: child exited with: 2`, il se peut que ce soit car le paquet **libcgi-fast-perl** manque
|
Créer une unité systemd pour gérer le démon :
|
||||||
|
|
||||||
|
~~~ { .bash }
|
||||||
On le mettra dans `/etc/rc.local` pour le lancer au démarrage de la machine (un script d'init bien fait est disponible sur <http://files.julienschmidt.com/public/cfg/munin/spawn-fcgi-munin-graph>
|
tee > /etc/systemd/system/spawn-fcgi-munin-graph.service << 'eof'
|
||||||
|
|
||||||
En Debian 8 on pourra créer une unité systemd :
|
|
||||||
|
|
||||||
~~~{.ini}
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Munin zoom for nginx.
|
Description=Munin zoom for nginx.
|
||||||
After=network.target
|
After=network.target
|
||||||
|
@ -135,8 +131,19 @@ Type=forking
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
|
eof
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl start spawn-fcgi-munin-graph
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
Pour vérifier si le démon tourne :
|
||||||
|
|
||||||
|
~~~ { .bash }
|
||||||
|
systemctl status spawn-fcgi-munin-graph
|
||||||
|
lsof /var/run/munin/spawn-fcgi-munin-graph.sock
|
||||||
|
~~~
|
||||||
|
|
||||||
|
> Si spawn-fcgi ne démarre pas mais renvoie `spawn-fcgi: child exited with: 2`, il se peut que ce soit car le paquet `libcgi-fast-perl` manque.
|
||||||
|
|
||||||
Enfin dans le vhost concerné d'Nginx, ajoutez-ceci :
|
Enfin dans le vhost concerné d'Nginx, ajoutez-ceci :
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue