Giter VIP home page Giter VIP logo

ansible-munin's Introduction

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.

ansible-munin's People

Contributors

jonhattan avatar slaarti avatar twod avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.