[PATCH] - template our nrpe.cfg - setup vars for nrpe_procs_crit and nrpe_procs_warn - set the value for crit and warn higher for mirrorlists to stop their whining

Seth Vidal skvidal at fedoraproject.org
Thu Jun 20 20:59:56 UTC 2013


---
 files/nagios/client/nrpe.cfg    |    2 +-
 inventory/group_vars/all        |    4 ++++
 inventory/group_vars/mirrorlist |    3 ++-
 tasks/nagios_client.yml         |    4 ++--
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/files/nagios/client/nrpe.cfg b/files/nagios/client/nrpe.cfg
index b2a8680..81eb0ee 100644
--- a/files/nagios/client/nrpe.cfg
+++ b/files/nagios/client/nrpe.cfg
@@ -202,7 +202,7 @@ command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
 command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
 command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
 command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
-command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 175 -c 200 
+command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w {{ nrpe_procs_warn }} -c {{ nrpe_procs_crit }}
 
 
 # The following examples allow user-supplied arguments and can
diff --git a/inventory/group_vars/all b/inventory/group_vars/all
index 35fca48..bc014de 100644
--- a/inventory/group_vars/all
+++ b/inventory/group_vars/all
@@ -31,3 +31,7 @@ virt_install_command: /usr/sbin/virt-install -n ${inventory_hostname} -r ${mem_s
 
 # By default, nodes get no fedmsg certs.  They need to declare them explicitly.
 fedmsg_certs: []
+
+# by default the number of procs we allow before we whine
+nrpe_procs_warn: 175
+nrpe_procs_crit: 200
diff --git a/inventory/group_vars/mirrorlist b/inventory/group_vars/mirrorlist
index f31ef1c..58f12df 100644
--- a/inventory/group_vars/mirrorlist
+++ b/inventory/group_vars/mirrorlist
@@ -9,4 +9,5 @@ num_cpus: 4
 tcp_ports: [ 80 ]
 collectd_apache: true
 fas_client_groups: sysadmin-noc
-
+nrpe_procs_warn: 250
+nrpe_procs_crit: 300
diff --git a/tasks/nagios_client.yml b/tasks/nagios_client.yml
index 12c9f03..63c3b82 100644
--- a/tasks/nagios_client.yml
+++ b/tasks/nagios_client.yml
@@ -35,14 +35,14 @@
 # FIXME? figure out nrpe selinux policy of DOOM is needed
 
 - name: /etc/nagios/nrpe.cfg
-  copy: src=$files/nagios/client/nrpe.cfg dest=/etc/nagios/nrpe.cfg 
+  template: src=$files/nagios/client/nrpe.cfg dest=/etc/nagios/nrpe.cfg
   notify:
   - restart nrpe
   tags:
   - config
 
 - name: install nrpe client configs
-  copy: src=$files/nagios/client/$item dest=/etc/nrpe.d/$item
+  template: src=$files/nagios/client/$item dest=/etc/nrpe.d/$item
   with_items:
   - check_mirrorlist_cache.cfg
   - check_raid.cfg
-- 
1.7.2.1



More information about the infrastructure mailing list