Installs Nagios 4.3.4 from source. Once Nagios is installed you can login to http://ip-address/nagios/ using the username and password you configure in the nagios_users variable. The NRPE client can be installed through wilmardo.nrpe_client, this enables Nagios to monitor the server.
None.
For default usage of this role you only need to define the following, for more advanced usage look at the Advanced usage section:
# The users which should be allowed to login to the Nagios web GUI.
nagios_users:
- user: nagiosadmin
pass: Password1change
For more advanced usage the following variables are available:
# The directory where the downloaded files will be placed and extracted.
nagios_download_dir: "{{ ansible_env.HOME }}/nagios"
# The version of Nagios to be installed
nagios_version: 4.3.4
# The Nagios download url
nagios_url: "https://github.com/NagiosEnterprises/nagioscore/archive/nagios-{{ nagios_version }}.tar.gz"
# The name of the untarred Nagios directory
nagios_src: "nagioscore-nagios-{{ nagios_version }}"
# The version of Nagios Plugins to be installed
nagios_plugins_version: 2.2.1
# The Nagios Plugins download url
nagios_plugins_url: "https://github.com/nagios-plugins/nagios-plugins/archive/release-{{ nagios_plugins_version }}.tar.gz"
# The name of the untarred Nagios Plugins directory
nagios_plugins_src: "nagios-plugins-release-{{ nagios_plugins_version }}"
# The user which the Nagios daemon runs as
nagios_monitoring_user: nagios
# The group which the Nagios daemon runs as
nagios_monitoring_command_group: nagios
None.
Install Nagios and setup the password for your nagiosadmin user.
It is better to move the nagios_users
to host_vars of your project but this will work.
- hosts: nagios
roles:
- { role: wilmardo.nagios, nagios_users: [{name: nagiosadmin, pass: Password1change}, {name: nagiosadmin1, organization: Password2change}] } }
The role has automatic upgrade when you change the version with var:
nagios_version: 4.3.4
But the upgrade requires to remove some old files to, check build-nagios.yml for details.
BSD-3-Clause-Clear
This role was originally created by Patrick Ogenstad. Forked in 2017 by Wilmar den Ouden.