Nagios-plugins

It is a set of useful plugins that are needed by other plugins like Dell OpenManage plugin.

Basic information

  • Official Website: https://nagios-plugins.org/

  • License: GNU General Public License v3.0

  • Description: The official Nagios Plugins package contains over 50 plugins to get you started monitoring all the basics. [1]

Tested on (Requirements)

  • Nagios Core: Version \(\boldsymbol{\ge}\) 3.5.0

Installation

This taskfile is executed only if the folder /usr/local/nagios/libexec is not empty. This state is registered in the taskfile nagios-plugins-installed.yml, with the module find.

For more information about these registers read the section Installing Nagios Plugins.

The installation process consists of downloading, uncompressing, configuring and compiling the plugin.

---
- name: Assure existence of tempDir
  file:
    path: "{{ temp_dir }}"
    state: directory

- name: Download Nagios Plugins
  get_url:
    url: "{{ nagios_plugins_url }}"
    dest: "{{ temp_dir }}"

- name: Extract Nagios Plugins
  unarchive:
    src: "{{ temp_dir }}/nagios-plugins-2.2.1.tar.gz"
    dest: "{{ temp_dir }}"

- name: Exec configure
  shell: "./configure --with-nagios-user=nagios --with-command-group=nagcmd"
  args:
    chdir: "{{ temp_dir }}/nagios-plugins-2.2.1"

- name: Make
  make:
     chdir: "{{ temp_dir }}/nagios-plugins-2.2.1"

- name: Make install
  make:
     chdir: "{{ temp_dir }}/nagios-plugins-2.2.1"
     target: install
  notify:
    - apache_restart

References