Munin: Don't redraw graphs every 5mn, we don't look at them that often.
This commit is contained in:
parent
308b6c2844
commit
9eb3582e39
|
@ -29,7 +29,7 @@
|
|||
location ^~ /munin-cgi/munin-cgi-graph/ {
|
||||
fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_pass unix:/var/run/munin/fcgi-graph.sock;
|
||||
fastcgi_pass unix:/run/munin/fcgi-graph.sock;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,3 +13,43 @@
|
|||
|
||||
- name: Configure munin
|
||||
template: src=munin.conf.j2 dest=/etc/munin/munin.conf
|
||||
|
||||
- name: Configure Munin FastCGI socket
|
||||
copy:
|
||||
dest: /etc/systemd/system/munin-graph.socket
|
||||
owner: root
|
||||
mode: 0644
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Munin FastCGI Graph Socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/munin/fcgi-graph.sock
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
|
||||
- name: Configure Munin FastCGI service
|
||||
copy:
|
||||
dest: /etc/systemd/system/munin-graph.service
|
||||
owner: root
|
||||
mode: 0644
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Munin FastCGI Graph
|
||||
Requires=munin-graph.socket
|
||||
|
||||
[Service]
|
||||
User=munin
|
||||
Group=munin
|
||||
ExecStart=/usr/lib/munin/cgi/munin-cgi-graph
|
||||
StandardInput=socket
|
||||
StandardOutput=inherit
|
||||
StandardError=journal
|
||||
|
||||
- name: Enable Munin FastCGI socket
|
||||
systemd:
|
||||
name: "munin-graph.socket"
|
||||
state: started
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
|
|
|
@ -7,9 +7,11 @@ contact.email.command mail -s "Munin-notification for ${var:group} :: ${var:host
|
|||
|
||||
tmpldir /etc/munin/templates
|
||||
|
||||
graph_width 600
|
||||
graph_height 400
|
||||
max_graph_jobs 2
|
||||
# Munin graph
|
||||
graph_strategy cgi
|
||||
|
||||
# Munin update
|
||||
fork no
|
||||
|
||||
{% for host in groups["all"] %}
|
||||
[{{ hostvars[host]['inventory_hostname'] }}]
|
||||
|
|
Loading…
Reference in New Issue
Block a user