CoffeeITWorks.nagios4_server_plugins

nagios4_server_plugins

Build Status

This role helps you install Nagios plugins and easily add more commands for Nagios.

How to add plugins to Nagios:

  • Simply put the plugin files in the files/plugins directory.
  • Modify some variables in defaults/main.yml:
    • Clone repositories using nagios_plugins_repos variable.
    • Install packages with pip3 using the nagios_plugins_pip3_packages variable.
    • Install packages with pip2 using the nagios_plugins_pip2_packages variable.
    • Add apt packages using the nagios_plugins_apt_packages variable.

If you want to install the wmic and wmiplus plugins and commands (compatible with Ubuntu 16.04 and newer):

nagios_plugins_install_checkwmiplus: True

Then, add the commands by editing templates/commands/command_file.cfg, or place your command files in the templates/commands directory. These files will be automatically copied to the correct location.

Make sure to review the existing commands that come with the plugins and check the templates/ folder for additional command files.

Requirements

You need to have Nagios 4 server set up, preferably using our Ansible role.

Supported Distributions

  • Ubuntu: Yes
  • Debian: Yes
  • RedHat: No (check the tests.txt file for details)
  • Latest Ubuntu LTS: Yes

Role Variables

See defaults/main.yml

Commands are copied to {{ nagios_config_cfg_dir}}/plugins, and plugins go to {{ nagios_plugins_dir }}.

For your host or group variables, you can set:

check_url_proxy_server: 'proxy_server'
check_url_proxy_user: 'proxy_user'
check_url_proxy_password: 'proxy_password'

Dependencies

  • ansiblecoffee.nagios4_server

Example Playbook

Basic usage:

- hosts: servers_nagios
  vars:
    nagios_plugins_install_checkwmiplus: True
  roles:
    - role: ansible-role-nagios
    - role: coffeeitworks.ansible_nagios4_server_config
    - role: ansible_nagios4_server_plugins

Complete list of roles:

Check requirements.yml for examples of role names.

Most roles should start with coffeeitworks. or just use simplified names:

- name: apply Nagios settings
  hosts: nagios4_servers
  become: yes
  become_method: sudo
  roles:
    - { role: nagios4_server, tags: ["install", "nagios4_server_all", "nagios4_server"] }
    - { role: nagios4_server_plugins, tags: ["install", "nagios4_server_all", "nagios4_server_plugins"] }
    - { role: nagios4_server_pnp4nagios, tags: ["install", "nagios4_server_all", "nagios4_server_pnp4nagios"] }
    - { role: geerlingguy.mysql, tags: ["install", "nagios4_server_all", "nagios4_server_thruk", "ANXS.mysql"] }
    - { role: nagios4_server_thruk, tags: ["install", "nagios4_server_all", "nagios4_server_thruk"] }
    - { role: postfix_client, tags: ["install", "nagios4_server_all", "postfix_client"] }
# More tags can be added as needed.
# For example:
# nagios4_server - config_nagios
# nagios4_server_plugins - config_nagios_plugins

Tags:

  • config_nagios_plugins
  • test_nagios_plugins

We need assistance to support CentOS 7.

TODO:

  • Add tests for Icinga support.

License

BSD

Author Information

Main authors: Diego Daguerre, Pablo Estigarribia.
Website: CoffeeITWorks

Informazioni sul progetto

Install nagios plugins from multiple sources

Installa
ansible-galaxy install CoffeeITWorks.nagios4_server_plugins
Licenza
mit
Download
88
Proprietario
IT Works group