nginx: Do not use spawn-fcgi for munin-graph #139
|
@ -25,6 +25,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
|||
* mongodb: Deny the install on Debian 11 « Bullseye » when the version is unsupported
|
||||
* mongodb: Support version 5.0 (for buster)
|
||||
* mongodb: Allow to specify a mongodb version for buster & bullseye
|
||||
* nginx: no longer use spawn-fcgi for munin zoom (instead use a systemd socket file + service)
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
15
nginx/files/systemd/fcgi-munin-graph.service
Normal file
15
nginx/files/systemd/fcgi-munin-graph.service
Normal file
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Munin zoom for nginx.
|
||||
After=network.target
|
||||
Requires=fcgi-munin-graph.socket
|
||||
|
||||
[Service]
|
||||
User=munin
|
||||
Group=munin
|
||||
ExecStart=/usr/lib/munin/cgi/munin-cgi-graph
|
||||
StandardInput=socket
|
||||
StandardOutput=null
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
12
nginx/files/systemd/fcgi-munin-graph.socket
Normal file
12
nginx/files/systemd/fcgi-munin-graph.socket
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Socket for Munin zoom
|
||||
|
||||
[Socket]
|
||||
SocketUser=www-data
|
||||
SocketGroup=www-data
|
||||
SocketMode=0600
|
||||
ListenStream=/run/munin/spawn-fcgi-munin-graph.sock
|
||||
Accept=no
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=Munin zoom for nginx.
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/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
|
||||
Type=forking
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
|
@ -28,14 +28,19 @@
|
|||
args:
|
||||
warn: no
|
||||
|
||||
- name: Systemd socket unit for Munin-fcgi is installed
|
||||
copy:
|
||||
src: systemd/fcgi-munin-graph.socket
|
||||
dest: /etc/systemd/system/fcgi-munin-graph.socket
|
||||
|
||||
- name: Systemd unit for Munin-fcgi is installed
|
||||
copy:
|
||||
src: systemd/spawn-fcgi-munin-graph.service
|
||||
dest: /etc/systemd/system/spawn-fcgi-munin-graph.service
|
||||
src: systemd/fcgi-munin-graph.service
|
||||
dest: /etc/systemd/system/fcgi-munin-graph.service
|
||||
|
||||
- name: Systemd unit for Munin-fcgi is started
|
||||
jlecour
commented
I guess we should change the name to I guess we should change the name to `Systemd socket for Munin-fcgi is installed` to mention the socket instead of the service.
|
||||
systemd:
|
||||
name: spawn-fcgi-munin-graph
|
||||
name: fcgi-munin-graph.socket
|
||||
mtrossevin
commented
Enabling only the socket mean that the service will be started on the first connexion on said socket instead of being started on boot. That increase the latency for the very first connexion (+ the first after a crash of the service) in exchange of not blocking boot until the service is started. Enabling only the socket mean that the service will be started on the first connexion on said socket instead of being started on boot. That increase the latency for the very first connexion (+ the first after a crash of the service) in exchange of not blocking boot until the service is started.
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
||||
|
|
Loading…
Reference in a new issue
This allow the service to be started on boot instead of waiting for the first connexion on the socket if wanted.