Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

sbitio/ansible-munin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This role is abandoned.

Munin

Performs installation and configuration of Munin master, nodes and plugins.

Provides an action plugin to facilitate configuration of plugins. See below for details.

This role is Work In Progress. See TODO file for some details.

For in-depth explanation of action plugins in roles please see sbitmedia.monit's README.

Requirements

Since Ansible doesn't support action plugins in roles, it is needed to explicitly add the path to this role's action plugins in ansible.cfg.

Example:

action_plugins = ./contrib/roles/sbitmedia.munin/action_plugins

Happily, action_plugins supports relative paths. Paths are separated by colon (:).

Role Variables

The role provides sane defaults, and respects configuration files provided by the OS whenever possible.

Default variables are documented in defaults/main.yml.

Role variables are set per OS. See: vars/*.yml.

See also the args accepted by munin_plugin in library/munin_plugin.

Example Usage

Using the role is straightforward, just include it and set overrides as needed.

Following playbook shows several examples of munin_plugin usage.

- hosts: servers
  roles:
    - sbitmedia.munin

  tasks:
    - munin_plugin: 
      args:
        name: munin_update
      when: munin_role_master == true and munin_role_node == true

    - munin_plugin:
      args:
        name: if_
        instance: if_eth0

    - munin_plugin:
      args:
        name: postfix_mailvolume
        config: |
          group adm
          env.logfile mail.log

Leverage Munin in your roles

There's two ways to leverage this role in your own roles.

  • Hard dependency: add sbitmedia.munin as a dependency in your role and start ruling your own checks with no drawbacks at all.

  • Soft dependency: use sbitmedia.munin when it is available. For this to work, several thing need to happen:

  1. the role must be included before yours.
  2. calls to munin_plugin must be done this way, to avoid syntax errors in Ansible:
- name: Configure fail2ban service in Munin
  action: munin_plugin
  args:
    name: fail2ban
    config: |
      user root
      group root
  when: munin_node_service is defined

You can see a full-fledged pattern for integration of external services in sbitmedia.fail2ban. See its main.yml along with external.yml and external/*.

License

BSD

Author Information

Jonathan Araña Cruz - SB IT Media, S.L.

About

Ansible role to manage Munin master, nodes and plugins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages