jloh.nagios_nrpe_server
Nagios NRPE Server Configuration
This is an Ansible role that helps install and set up the Nagios NRPE Daemon.
I have chosen specific systems that I know work perfectly, but it should be compatible with any system where NRPE can be installed.
Currently, it supports:
- Debian:
- Squeeze
- Wheezy
- Ubuntu:
- Raring
- Saucy
- Trusty
- RedHat:
- Version 6 and above
- Arch Linux:
- All versions
- Solaris:
- Version 11.1 and above
Requirements
For RedHat-based OS, you must have the EPEL repository enabled.
Role Information
This role allows you to deploy plugins globally or for specific servers. You can place plugins in files/plugins/global
or create a directory in files/plugins/
with the server's Fully Qualified Domain Name (FQDN).
You can find your server's FQDN by using the Ansible Setup module.
Role Variables
Here are some important variables:
- nagios_nrpe_server_bind_address: 127.0.0.1
- nagios_nrpe_server_port: 5666
- nagios_nrpe_server_allowed_hosts: 127.0.0.1
- nagios_nrpe_command: see example playbook section
These settings are specific to the operating system and usually should not be altered.
For Debian:
- nagios_nrpe_server_pid: /var/run/nagios/nrpe.pid
- nagios_nrpe_server_user: nagios
- nagios_nrpe_server_group: nagios
- nagios_nrpe_server_service: nagios-nrpe-server
- nagios_nrpe_server_plugins_dir: /usr/lib/nagios/plugins
- nagios_nrpe_server_dir: /etc/nagios
For RedHat:
- nagios_nrpe_server_pid: /var/run/nrpe/nrpe.pid
- nagios_nrpe_server_user: nrpe
- nagios_nrpe_server_group: nrpe
- nagios_nrpe_server_repo_redhat: epel
- nagios_nrpe_server_service: nrpe
- nagios_nrpe_server_dir: /etc/nagios
For Arch Linux:
- nagios_nrpe_server_pid: /var/run/nrpe/nrpe.pid
- nagios_nrpe_server_user: 31
- nagios_nrpe_server_group: 31
- nagios_nrpe_server_service: nrpe
- nagios_nrpe_server_plugins_dir: /usr/lib/monitoring-plugins
- nagios_nrpe_server_dir: /etc/nrpe
For Solaris:
- nagios_nrpe_server_dir: /etc/opt/csw
- nagios_nrpe_server_group: nagios
- nagios_nrpe_server_pid: /var/run/nrpe.pid
- nagios_nrpe_server_plugins_dir: /opt/csw/libexec/nagios-plugins
- nagios_nrpe_server_service: svc:/network/cswnrpe:default
- nagios_nrpe_server_user: nagios
Dependencies
N/A
Example Playbook
- hosts: servers
roles:
- jloh.nagios_nrpe_server
vars:
nagios_nrpe_server_allowed_hosts:
- 192.168.0.1
- 127.0.0.1
nagios_nrpe_command:
oracle_tnsping:
script: check_oracle_health
option: --mode tnsping
oracle_connection-time:
script: check_oracle_health
option: --mode connection-time
License
MIT License
Author Information
Visit my blog here.
Nagios NRPE Server configuration Ansible Role
ansible-galaxy install jloh.nagios_nrpe_server