[project @ peter@palfrader.org-20080404151515-7d2s6wnlb8pfnjen]
authorPeter Palfrader <peter@palfrader.org>
Fri, 4 Apr 2008 15:15:15 +0000 (11:15 -0400)
committerPeter Palfrader <peter@palfrader.org>
Fri, 4 Apr 2008 15:15:15 +0000 (11:15 -0400)
split hosts into those that have a heavy mail setup (SA, clamav, greylist) and those that haven't

nagios-master.cfg

index 3f20620..3642c47 100644 (file)
@@ -97,19 +97,19 @@ servers:
 
   samosa:
     address: 192.25.206.57
-    hostgroups: computers, service, dl380, apache2-hosts, bind9-hosts
+    hostgroups: computers, service, dl380, apache2-hosts, bind9-hosts, heavy-email
   raff:
     address: 192.25.206.59
     parents: samosa
-    hostgroups: computers, service, dl380, apache1-hosts, bind9-hosts, rsyncd-hosts
+    hostgroups: computers, service, dl380, apache1-hosts, bind9-hosts, rsyncd-hosts, heavy-email
   gluck:
     address: 192.25.206.10
     parents: samosa
-    hostgroups: computers, general, dl380, apache1-hosts, bind9-hosts, rsyncd-hosts
+    hostgroups: computers, general, dl380, apache1-hosts, bind9-hosts, rsyncd-hosts, heavy-email
   merkel:
     address: 192.25.206.16
     parents: samosa
-    hostgroups: computers, general, apache1-hosts, bind9-hosts, rsyncd-hosts, sw-raid, postgres81-hosts
+    hostgroups: computers, general, apache1-hosts, bind9-hosts, rsyncd-hosts, sw-raid, postgres81-hosts, heavy-email
   spohr:
     address: 192.25.206.33
     parents: samosa
@@ -118,7 +118,7 @@ servers:
   bartok:
     address: 82.195.75.91
     parents: gw-MAN-DA-debian
-    hostgroups: computers, service, syslog-ng-hosts, postfix-hosts, dl385
+    hostgroups: computers, service, syslog-ng-hosts, postfix-hosts, dl385, heavy-email
   sperger:
     address: 82.195.75.98
     parents: gw-MAN-DA-debian
@@ -135,17 +135,17 @@ servers:
   master:
     address: 70.103.162.29
     parents: gw-brainfood
-    hostgroups: computers, general, apache2-hosts, bind9-hosts
+    hostgroups: computers, general, apache2-hosts, bind9-hosts, heavy-email
 
   ries:
     address: 128.148.34.103
     parents: gw-osuosl
-    hostgroups: computers, service, apache2-hosts, bind9-hosts, ftpd-hosts, dl385, rsyncd-hosts, postgres81-hosts
+    hostgroups: computers, service, apache2-hosts, bind9-hosts, ftpd-hosts, dl385, rsyncd-hosts, postgres81-hosts, heavy-email
 
   rietz:
     address: 140.211.166.43
     parents: gw-brown.edu
-    hostgroups: computers, service, apache2-hosts, bind9-hosts, rsyncd-hosts, dl385
+    hostgroups: computers, service, apache2-hosts, bind9-hosts, rsyncd-hosts, dl385, heavy-email
   rietz2:
     address: 140.211.166.44
     parents: rietz
@@ -168,12 +168,12 @@ servers:
   klecker:
     address: 194.109.137.218
     parents: gw-xs4all
-    hostgroups: computers, service, apache2-hosts, ftpd-hosts, rsyncd-hosts, bind9-hosts, dl385, postgres81-hosts
+    hostgroups: computers, service, apache2-hosts, ftpd-hosts, rsyncd-hosts, bind9-hosts, dl385, postgres81-hosts, heavy-email
 
   saens:
     address: 128.101.240.212
     parents: gw-umn.edu
-    hostgroups: computers, service, apache2-hosts, ftpd-hosts, rsyncd-hosts, dl380
+    hostgroups: computers, service, apache2-hosts, ftpd-hosts, rsyncd-hosts, dl380, heavy-email
 
   argento:
     address: 195.49.152.174
@@ -232,6 +232,9 @@ hostgroups:
   postfix-hosts:
     alias: hosts running postfix instead of exim
     private: 1
+  heavy-email:
+    alias: "hosts running the full mail stuff, including clamav, SA, and greylistd"
+    private: 1
   apache2-hosts:
     alias: hosts running apache2
     private: 1
@@ -454,32 +457,38 @@ services:
   -
     name: process - clamav - clamd
     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:2 -c 1: -u clamav -C clamd -a '/usr/sbin/clamd'"
-    hostgroups: computers
-    excludehostgroups: postfix-hosts
+    hostgroups: heavy-email
   -
     name: service - clamav
     nrpe: "/usr/lib/nagios/plugins/check_clamd -H /var/run/clamav/clamd.ctl"
-    hostgroups: computers
-    excludehostgroups: postfix-hosts
+    hostgroups: heavy-email
     depends: process - clamav - clamd
   -
     name: process - clamav - freshclam
     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u clamav -C freshclam -a '/usr/bin/freshclam -d --quiet'"
+    hostgroups: heavy-email
+  #
+  -
+    name: unwanted process - clamav
+    nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:0 -C clamd"
     hostgroups: computers
-    excludehostgroups: postfix-hosts
+    excludehostgroups: heavy-email
+  -
+    name: unwanted process - freshclam
+    nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:0 -C freshclam"
+    hostgroups: computers
+    excludehostgroups: heavy-email
  ###
   -
     name: process - spamd - master
     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C spamd -a '/usr/sbin/spamd --create-prefs --max-children 5 --helper-home-dir -d --pidfile=/var/run/spamd.pid'"
     #hosts: samosa
-    hostgroups: computers
-    excludehostgroups: postfix-hosts
+    hostgroups: heavy-email
     excludehosts: rietz
   -
     name: process - spamd - child
     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:6 -c 1: -C spamd -a 'spamd child'"
-    hostgroups: computers
-    excludehostgroups: postfix-hosts
+    hostgroups: heavy-email
     depends: process - spamd - master
     excludehosts: rietz
   #
@@ -491,13 +500,25 @@ services:
     name: process - spamd - child
     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:6 -c 1: -u debbugs -C spamd -a 'spamd child'"
     hosts: rietz
+  #
+  -
+    name: unwanted process - spamd
+    nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:0 -C spamd"
+    hostgroups: computers
+    excludehostgroups: heavy-email
 
  ###
   -
     name: process - greylistd
     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u greylist -C greylistd -a '/usr/bin/python /usr/sbin/greylistd'"
+    hostgroups: heavy-email
+  #
+  -
+    name: unwanted process - greylistd
+    nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:0 -C greylistd"
     hostgroups: computers
-    excludehostgroups: postfix-hosts
+    excludehostgroups: heavy-email
+
 
  ###
   -