/ansible-munin

Ansible role for setting up munin server

Role Name

Sets up munin server

Requirements

Debian wheezy server with backports enabled (using role) and ansible running

Role Variables

Core switches

Those switches lets you to switch on/off additional functionalities

  • munin_cgi - changes graph and html strategies from periodically generated by cron to generated on-demand by CGI script
  • munin_cgi_cache - if CGI is enabled, adds extra HTTP cache based on nginx
  • munin_rrdcached - configures support for rrdcached to munin, that allows to increase statistics gathering capacity

Other switches

  • munin_graph_cgi_processes - number of maximum cgi processes that can run in parallel
  • munin_graph_cgi_url - grap cgi url
  • munin_graph_cgi_tmp - graph cgi temporary directory
  • munin_update_processes - maximum number of update processes that can run in parallel
  • munin_max_size_x and munin_max_size_y - are the max size of images in pixel. Default is 4000. Do not make it too large otherwise RRD might use all RAM to generate the images.
  • munin_graph_period - You can choose the time reference for "DERIVE" like graphs, and show "per minute", "per hour" values instead of the default "per second"

Users and group configuration

  • munin_update_user, munin_update_group - user and group that update cron is running as
  • munin_cgi_user, munin_cgi_group - user and group that cgi script is running as

RRDCached configuration

  • munin_rrdcached_socket - path to socket that rrdcached is running as
  • munin_rrdcached_group - name of extra group, that is allowed to connect to rrdcached
  • munin_rrdcached_opts - hashmap of extra parameters for rrdcached. See rrdcached documentation for more information

Directories used by munin

  • munin_dbdir - Base directory for all rrd files (files go into $dbdir/$domain/)
  • munin_htmldir - Where pngs and html files end up.
  • munin_logdir - Where to send logs.
  • munin_rundir - Where to put state files.
  • munin_tmpldir - Where the templates reside.
  • munin_staticdir - Where to look for the static www files

Contacts for limits

  • munin_contacts - List of hashmaps for contact users. Each hashmap should consist of name and command field as shown below :
- name: nagios
  command: mail -s "Munin notification" somejuser@fnord.comm

Dependencies

jnv.debian-backports - Sets up backports on debian

Example Playbook

---
- hosts: all
  roles:
      - { role: munin, munin_cgi: True, munin_cgi_cache: True, munin_rrdcached: True, munin_graph_cgi_processes: 2}

After that you can integrate it with other role that supports nginx, or install it directly with simple nginx vhost:

server {
	listen   80;
	server_name default;
	include /etc/munin/nginx.conf;
}

License

BSD

Author Information

Rafał Trójniak ansible-galaxy@trojniak.net