From 7075c0e6f0b4f29b48b08d8b256361abb9eaf1dd Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Sun, 30 Apr 2017 02:19:34 +0000 Subject: [PATCH] we were doing well with nomail so lets try noswap --- .../files/nagios/services/swap.cfg | 23 +++++-------------- .../templates/nagios/hostgroups/nomail.cfg.j2 | 1 + .../templates/nagios/hostgroups/noswap.cfg.j2 | 5 ++++ 3 files changed, 12 insertions(+), 17 deletions(-) create mode 100644 roles/nagios_server/templates/nagios/hostgroups/noswap.cfg.j2 diff --git a/roles/nagios_server/files/nagios/services/swap.cfg b/roles/nagios_server/files/nagios/services/swap.cfg index 44ed9193be..75cc6553d8 100644 --- a/roles/nagios_server/files/nagios/services/swap.cfg +++ b/roles/nagios_server/files/nagios/services/swap.cfg @@ -1,20 +1,9 @@ -# define service { -# hostgroup swap -# service_description Swap -# check_command check_by_nrpe!check_swap -# use criticaltemplate -# } - -#define service { -# hostgroup buildservers -# service_description Swap -# check_command check_by_nrpe!check_swap -# use criticaltemplate -# notification_period 16x7 -# contact_groups fedora-sysadmin-email -# retry_check_interval 5 -# max_check_attempts 12 -#} +define service { + hostgroup noswap + service_description No Swap + check_command check_by_nrpe!check_swap + use criticaltemplate +} define service { hostgroup retrace diff --git a/roles/nagios_server/templates/nagios/hostgroups/nomail.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/nomail.cfg.j2 index 6a83ad30ba..2f4d8ef1b9 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/nomail.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/nomail.cfg.j2 @@ -2,3 +2,4 @@ define hostgroup { hostgroup_name nomail alias No Mail members *, {% for host in groups['bastion'] %}!{{host}}, {% endfor %}{% for host in groups['smtp-mm'] %}!{{host}}, {% endfor %}{% for host in vars['phx2_management_hosts'] %}!{{host}}{% if not loop.last %},{% endif %} {% endfor %} +} diff --git a/roles/nagios_server/templates/nagios/hostgroups/noswap.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/noswap.cfg.j2 new file mode 100644 index 0000000000..a59913f416 --- /dev/null +++ b/roles/nagios_server/templates/nagios/hostgroups/noswap.cfg.j2 @@ -0,0 +1,5 @@ +define hostgroup { + hostgroup_name noswap + alias No Swap + members {% for host in groups['twisted-buildbots'] %}{{host}}, {% endfor %}{% for host in groups['persistent-cloud'] %}{{host}}, {% endfor %}{% for host in groups['copr-dist-git'] %}{{host}}, {% endfor %}{% for host in groups['jenkins-master'] %}{{host}}, {% endfor %}{% for host in groups['maintainer-test'] %}{{host}}, {% endfor %}{% for host in groups['copr'] %}{{host}}, {% endfor %}{% for host in groups['copr-dist-git-stg'] %}{{host}}, {% endfor %}{% for host in groups['jenkins-slave'] %}{{host}}, {% endfor %}{% for host in groups['ipsilon-dev'] %}{{host}}, {% endfor %}{% for host in groups['copr-stg'] %}{{host}}, {% endfor %} +}