idiv-biodiversity.nrpe
Ansible Role: Nagios Remote Plugin Executor (NRPE)
This is an Ansible role that sets up and configures NRPE (Nagios Remote Plugin Executor).
Table of Contents
Requirements
- Ansible version 2 or higher
Role Variables
Here are the variables you can use along with their default settings:
nrpe_log_facility: 'daemon'
nrpe_pid_file: '/var/run/nrpe/nrpe.pid'
nrpe_server_port: '5666'
nrpe_user: 'nrpe'
nrpe_group: 'nrpe'
nrpe_allowed_hosts:
- '127.0.0.1'
- '::1'
nrpe_dont_blame: '0'
nrpe_allow_bash_command_substitution: '0'
nrpe_debug: '0'
nrpe_command_timeout: '60'
nrpe_connection_timeout: '300'
nrpe_commands:
- name: 'check_users'
line: '/usr/lib64/nagios/plugins/check_users -w 5 -c 10'
- name: 'check_load'
line: '/usr/lib64/nagios/plugins/check_load -r -w .15,.10,.05 -c .30,.25,.20'
- name: 'check_hda1'
line: '/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1'
- name: 'check_zombie_procs'
line: '/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z'
- name: 'check_total_procs'
line: '/usr/lib64/nagios/plugins/check_procs -w 150 -c 200'
Dependencies
This role needs [geerlingguy.repo-epel] for RedHat-based systems to install some necessary packages. These packages might not be available in the default repositories.
Example Playbook
Add the following to your requirements.yml
:
---
# optional
# - src: geerlingguy.repo-epel
- src: idiv-biodiversity.nrpe
...
To download it, run:
$ ansible-galaxy install -r requirements.yml
Top-Level Playbook
Create a top-level playbook like this:
---
- name: head server
hosts: head
roles:
- role: idiv-biodiversity.nrpe
tags:
- icinga
- nagios
- nrpe
...
Role Dependency
Set the role dependency in meta/main.yml
like this:
---
dependencies:
- role: idiv-biodiversity.nrpe
tags:
- icinga
- nagios
- nrpe
...
License
This role is licensed under the MIT license.
Author Information
This role was created in 2017 by [Christian Krause], also known as [wookietreiber on GitHub], who works as an HPC cluster systems administrator at the [German Centre for Integrative Biodiversity Research (iDiv)]. The initial draft was made by Ben Langenberg, known as [sloan87 on GitHub].
ansible-galaxy install idiv-biodiversity.nrpe