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` :
|
||||
|
||||
~~~
|
||||
# chown www-data:munin /var/log/munin/munin-cgi-*
|
||||
# chmod 660 /var/log/munin/munin-cgi-*
|
||||
~~~ { .bash }
|
||||
chown www-data:munin /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` :
|
||||
|
@ -111,20 +111,16 @@ De même pour `/etc/logrotate.d/munin`, section `/var/log/munin/munin-cgi-graph.
|
|||
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 :
|
||||
|
||||
~~~
|
||||
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
|
||||
~~~ { .bash }
|
||||
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 :
|
||||
|
||||
|
||||
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>
|
||||
|
||||
En Debian 8 on pourra créer une unité systemd :
|
||||
|
||||
~~~{.ini}
|
||||
~~~ { .bash }
|
||||
tee > /etc/systemd/system/spawn-fcgi-munin-graph.service << 'eof'
|
||||
[Unit]
|
||||
Description=Munin zoom for nginx.
|
||||
After=network.target
|
||||
|
@ -135,8 +131,19 @@ Type=forking
|
|||
|
||||
[Install]
|
||||
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 :
|
||||
|
||||
|
|
Loading…
Reference in a new issue