janneojala.nagios-nrpe-server
Nagios NRPE Server Configuration
This is an Ansible role for installing and setting up the Nagios NRPE Daemon.
I have only included certain platforms that I know work 100%, but it should function on any platform where NRPE can be installed.
Current Supported Platforms:
- Debian:
- Squeeze
- Wheezy
- Ubuntu:
- Raring
- Saucy
- Trusty
- RedHat:
- At least version 6 and above
- Arch Linux:
- All versions
- Solaris:
- At least version 11.1
Requirements
For RedHat-based operating systems, you need to have the EPEL repository.
Role Information
This role allows you to deploy plugins either globally or specifically for each server. Use the files/plugins/global
folder for global plugins, or create a folder in files/plugins/
named with the server's Fully Qualified Domain Name (FQDN).
To find out your server's FQDN, run the Ansible Setup module here.
Role 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 variables are specific to the operating system and generally should not be changed.
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
None
Example Playbook
- hosts: servers
roles:
- mooash.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.
ansible-galaxy install janneojala.nagios-nrpe-server