Ansible role to install "Monitoring Plugins" and configure a host to monitor via NRPE or SSH.
Find a file
2025-03-30 13:25:28 +02:00
defaults Convert to lowercase true/false 2024-11-08 11:52:58 +01:00
files/plugins_custom Better name for placeholder 2018-10-18 12:46:00 +02:00
meta Add dependency on role "prepare-dnf5" 2025-03-26 17:38:08 +01:00
tasks Allow SSH keys as strings or filenames ("*.pub") 2025-03-30 13:25:28 +02:00
templates Allow SSH keys as strings or filenames ("*.pub") 2025-03-30 13:25:28 +02:00
vars Small fix for NRPE/voidlinux 2025-03-27 09:50:49 +01:00
.gitignore Feature: Copy custom plugins 2018-10-02 22:44:11 +02:00
monitored.yml Removed EPEL from example playbook 2025-03-27 09:50:59 +01:00
README.md Allow SSH keys as strings or filenames ("*.pub") 2025-03-30 13:25:28 +02:00

monitored

Prepare remote machine for monitoring with Naemon/Nagios/Icinga via NRPE and/or SSH

Requirements

  • Role "epel" for RedHat-like systems
  • Role "prepare-dnf5" for RedHat-like system with DNF version 5

Role Variables

Defaults (config/overwrite required):

  • monitored_by_nrpe (defaults: false): install/configure NRPE
  • monitored_by_ssh (defaults: false): install/configure SSH incl. wrapper script
  • monitored_server_ips (defaults: [127.0.0.1,]: list(!) of monitoring server ips

Required for SSH:

  • monitored_ssh_key_files (defaults: []): list(!) of SSH key strings or filenames (ending with .pub)

Common variables:

  • monitored_packages_install (defaults: true): install plugings
  • monitored_sudo_file (defaults: /etc/sudoers.d/monitored): sudoers file
  • monitored_sudo_commands: list of sudoers config lines
  • monitored_packages_additional(_nrpe|_ssh): additional packages to install
  • monitored_plugins_custom: additional plugin scripts to copy
  • monitored_plugins_custom_path (defaults: /usr/local/plugins/): path for additional plugins

NRPE:

  • monitored_nrpe_*: NRPE config variables

SSH:

  • monitored_ssh_key_wrapper: local path/filename of wrapper
  • monitored_ssh_key_wrapper_src: remote path and filename of wrapper
  • monitored_ssh_key_wrapper_*: file attributes of wrapper

Example Playbook

- hosts: all
  roles:
    - role: monitored
      when: monitored_dont|default(false) != true

License

GPL-2.0-or-later

Author Information

Sven Velt - sven-ansiblerole@velt.biz https://git.velt.biz/velt.biz/