ansible/roles/nagios_server
Kevin Fenzi c84b99223c osbs: raise a glass for it's service
This removes osbs and allmost all it's associated playbooks and files.

It served long and well, but we no longer need it.
flatpaks are building with a koji-flatpak plugin.
base/minimal/toolbox containers are building with kiwi.
We aren't building any other containers right now, and we did they could
be added to kiwi.

This is the end of an era... I look with nostolga on
ansible-ansible-openshift-ansible (a role to setup ansible on a control
host and run it from our ansible).

Good bye osbs!

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-03-28 12:52:07 -07:00
..
files osbs: raise a glass for it's service 2024-03-28 12:52:07 -07:00
handlers put in the first run at new nagios configs 2017-01-05 00:55:16 +00:00
tasks osbs: raise a glass for it's service 2024-03-28 12:52:07 -07:00
templates nagios: fix stray ampersand that was breaking the curl command 2024-02-23 18:51:32 -08:00
README.rst put in the first run at new nagios configs 2017-01-05 00:55:16 +00:00

===================================
 Nagios 4 Configuration for Fedora
===================================

The Fedora Infrastructure Nagios is built on a set of configurations
originally written for Nagios 2 and then upgraded over time to Nagios
3 and then 4.08. With additional changes made in the 4.2 series of
Nagios this needed a better rewrite as various parts came from
pre-puppet and then various puppet modules added on top. 

In order to get this rewrite done, we will use as much of the original
layout of the Fedora ansible nagios module but with rewrites to better
match current Nagios configurations so that it can be maintained.

Role directory layout
=====================
The original layout branched out from 

  roles/nagios/client/
  roles/nagios/server/

With the usual trees below this. This breaks ansible best practices
and how most new modules are set up so the rewrite uses:

  roles/nagios_client/
  roles/nagios_server/

=====================
 Nagios Server Files
=====================

The Nagios Server Files require a large layout change. The original
Nagios system used multiple independant modes and files which caused
problems when hosts were removed. The new system will use hosts set up
from the Fedora Ansible Inventory with hostgroups set up to match
groups.

  roles/nagios_server/{files,handlers,tasks,templates}

  r.../n.../files/httpd ==> /etc/httpd/conf.d files
  r.../n.../files/nagios ==> /etc/nagios/ files
  r.../n.../files/nagios/commands      command files
  r.../n.../files/nagios/hosts         host files
  r.../n.../files/nagios/hostgroups    groups made from hosts
  r.../n.../files/nagios/services      services
  r.../n.../files/nagios/servicegroups groups made from services
  r.../n.../files/nagios/contacts      files for people
  r.../n.../files/nagios/contactgroups groups made from contacts
      
  similar layout for templates
  handlers has the ways to restart and check configuration
  tasks has the main rules for building stuff.

===================
Nagios Module Steps
===================

1. Check to see if the nagios user is configured. Someone years ago
   chose that our monitoring uses UID/GID 420. Har Har.
   Setup any other groups and permissions
2. Install the needed packages for the server.
3. Setup the directories on the server
    /etc/nagios/{child}
4. Synchonise over the static files
    /etc/nagios/commands/
    /etc/nagios/services/
    /etc/nagios/servicegroups/
    /etc/nagios/contacts/
    /etc/nagios/contactgroups/
    /usr/lib64/nagios/plugins/
    /usr/local/bin
    /usr/share/nagios/html/
5. Build template files
    /etc/nagios/commands/
    /etc/nagios/hosts/{ansible-inventory, ansible-vars, other}
    /etc/nagios/hostgroups/
6. Fix selinux policy
7. Restart services