[project @ peter@palfrader.org-20080403115113-jvbesux7e8rskfb2]
[mirror/dsa-nagios.git] / nagios-master.cfg
1 # Non comment lines are YAML
2 #
3 # Strings ought to be in double quotes, but it works in most cases if they aren't :)
4 #
5 # vim:set syntax=yaml:
6 ---
7 #############################
8 # hosts
9 #############################
10 servers:
11   gw-MAN-DA-debian:
12     address: 82.195.75.126
13     parents: gw-HP-ftc
14     hostgroups: routing-infrastructure
15   gw-HP-ftc:
16     address: 192.25.206.1
17     hostgroups: routing-infrastructure
18
19   samosa:
20     address: 192.25.206.57
21     hostgroups: computers, dl380, apache2-hosts, bind9-hosts
22
23   bartok:
24     address: 82.195.75.91
25     parents: gw-MAN-DA-debian
26     hostgroups: computers, syslog-ng-hosts, postfix-hosts, dl385
27   sperger:
28     address: 82.195.75.98
29     parents: gw-MAN-DA-debian
30     hostgroups: computers, sw-raid
31
32 #############################
33 # host groups
34 #
35 # hostgroups ircd and all are automatically defined
36 #
37 #############################
38 hostgroups:
39   computers:
40     alias: computers
41   routing-infrastructure:
42     alias: Internet routers and friends
43
44   dl380:
45     alias: HP DL380 hosts
46     private: 1
47   dl385:
48     alias: HP DL385 hosts
49     private: 1
50   sw-raid:
51     alias: Hosts with Linux software raid
52     private: 1
53
54   syslog-ng-hosts:
55     alias: hosts running syslog-ng instead of sysklogd
56     private: 1
57   postfix-hosts:
58     alias: hosts running postfix instead of exim
59     private: 1
60   apache2-hosts:
61     alias: hosts running apache2
62     private: 1
63   bind9-hosts:
64     alias: hosts running bind9
65     private: 1
66
67 #############################
68 # services
69 #############################
70 services:
71   -
72     name: PING
73     check: "check_ping!300.0,20%!600.0,40%"
74     hostgroups: all
75
76  ############ Services ############
77  ###
78
79  ############ Disk Usage ############
80  ####
81   -
82     name: disk usage - all
83     nrpe: "/usr/lib/nagios/plugins/check_disk 90 95"
84     hostgroups: computers
85   -
86     name: disk usage on /
87     nrpe: "/usr/lib/nagios/plugins/check_disk 60 80 /"
88     hostgroups: computers
89   -
90     name: disk usage on /boot
91     nrpe: "/usr/lib/nagios/plugins/check_disk 60 80 /boot"
92     hosts: sperger
93   -
94     name: disk usage on /var
95     nrpe: "/usr/lib/nagios/plugins/check_disk 50 75 /var"
96     hosts: bartok, samosa
97   -
98     name: disk usage on /org
99     nrpe: "/usr/lib/nagios/plugins/check_disk 80 90 /org"
100     hosts: bartok, sperger, samosa
101   -
102     name: disk usage on /tmp
103     nrpe: "/usr/lib/nagios/plugins/check_disk 60 80 /tmp"
104     hosts: samosa
105   -
106     name: disk usage on /usr
107     nrpe: "/usr/lib/nagios/plugins/check_disk 75 90 /usr"
108     hosts: samosa
109
110  ############ All Computers ############
111  ####
112   #-
113   #  name: apt - security updates
114   #  nrpe: "/usr/local/bin/nagios-check-apt-updates --warnifupdates"
115   #  hostgroups: computers
116   #  normal_check_interval: 480
117   #  notification_interval: 480
118   #  max_check_attempts: 4
119   #  retry_check_interval: 12
120  ####
121   -
122     name: users
123     nrpe: "/usr/lib/nagios/plugins/check_users 30 35"
124     hostgroups: computers
125  ####
126   -
127     name: load
128     nrpe: "/usr/lib/nagios/plugins/check_load -w 12,10,8 -c 22,18,14"
129     hostgroups: computers
130  ####
131   -
132     name: processes - zombies
133     nrpe: "/usr/lib/nagios/plugins/check_procs 5 10 -s Z"
134     hostgroups: computers
135  ####
136   -
137     name: processes - total
138     nrpe: "/usr/lib/nagios/plugins/check_procs 620 700"
139     hostgroups: computers
140  ####
141   -
142     name: swap usage - percent
143     nrpe: "/usr/lib/nagios/plugins/check_swap -w 20% -c 10%"
144     hostgroups: computers
145  ####
146   -
147     name: swap usage - mb
148     nrpe: "/usr/lib/nagios/plugins/check_swap -w 20000 -c 5000"
149     hostgroups: computers
150  ####
151   -
152     name: process - getty
153     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:8 -c 1: -u root -C getty -a /sbin/getty"
154     hostgroups: computers
155  ####
156   -
157     name: process - sshd
158     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:20 -c 1: -u root -C sshd -a '/usr/sbin/sshd'"
159     hostgroups: computers
160   -
161     name: "network service - sshd"
162     check: check_ssh
163     hostgroups: computers
164     depends: process - sshd
165     normal_check_interval:  60
166     notification_interval:  60
167  ####
168   -
169     name: network service - nrpe
170     check: check_tcp!5666
171     hostgroups: computers
172     max_check_attempts: -1
173   -
174     name: process - nrpe
175     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:25 -c 1: -u nagios -C nrpe -a '/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d'"
176     hostgroups: computers
177     depends: network service - nrpe
178  ###
179   -
180     name: process - munin-node
181     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:2 -c 1: -u root -C munin-node -a '/usr/sbin/munin-node'"
182     hostgroups: computers
183   -
184     name: network service - munin-node
185     check: check_tcp!4949
186     hostgroups: computers
187     depends: process - munin-node
188  ###
189   -
190     name: process - ntpd
191     # sarge: nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C ntpd -a '/usr/sbin/ntpd -p /var/run/ntpd.pid'"
192     # etch: nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u ntp -C ntpd -a '/usr/sbin/ntpd -p /var/run/ntpd.pid'"
193     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -C ntpd -a '/usr/sbin/ntpd -p /var/run/ntpd.pid'"
194     hostgroups: computers
195   -
196     name: network service - ntp
197     check: check_ntp
198     hostgroups: computers
199     depends: process - ntpd
200  ###
201   -
202     name: process - atd
203     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u daemon -C atd -a /usr/sbin/atd"
204     hostgroups: computers
205  ###
206   -
207     name: process - cron
208     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C cron -a /usr/sbin/cron"
209     hostgroups: computers
210
211  ###
212   -
213     name: process - syslog-ng
214     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C syslog-ng  -a '/sbin/syslog-ng -p /var/run/syslog-ng.pid'"
215     hostgroups: syslog-ng-hosts
216  ###
217   -
218     name: process - syslogd
219     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C syslogd  -a '/sbin/syslogd'"
220     hostgroups: computers
221     excludehostgroups: syslog-ng-hosts
222   -
223     name: process - klogd
224     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C klogd  -a '/sbin/klogd -x'"
225     hostgroups: computers
226     excludehostgroups: syslog-ng-hosts
227
228  ###
229   -
230     name: process - exim
231     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u Debian-exim -C exim4 -a '/usr/sbin/exim4 -bd -q'"
232     hostgroups: computers
233     excludehostgroups: postfix-hosts
234  ###
235   -
236     name: process - clamav - clamd
237     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:2 -c 1: -u clamav -C clamd -a '/usr/sbin/clamd'"
238     hostgroups: computers
239     excludehostgroups: postfix-hosts
240   -
241     name: service - clamav
242     nrpe: "/usr/lib/nagios/plugins/check_clamd -H /var/run/clamav/clamd.ctl"
243     hostgroups: computers
244     excludehostgroups: postfix-hosts
245     depends: process - clamav - clamd
246   -
247     name: process - clamav - freshclam
248     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u clamav -C freshclam -a '/usr/bin/freshclam -d --quiet'"
249     hostgroups: computers
250     excludehostgroups: postfix-hosts
251
252  ###
253   -
254     name: process - postfix - master
255     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C master -a '/usr/lib/postfix/master'"
256     hostgroups: postfix-hosts
257   -
258     name: process - postfix - qmgr
259     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C qmgr -a 'qmgr -l -t fifo -u'"
260     hostgroups: postfix-hosts
261     depends: process - postfix - master
262   #-
263   #  name: process - postfix - tlsmgr
264   #  nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C tlsmgr -a 'tlsmgr -l -t fifo -u'"
265   #  hostgroups: postfix-hosts
266   #  depends: process - postfix - master
267   -
268     name: process - postfix - pickup
269     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C pickup -a 'pickup -l -t fifo -u -c'"
270     hostgroups: postfix-hosts
271     depends: process - postfix - master
272   -
273     name: process - postfix - anvil
274     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C anvil -a 'anvil -l -t unix -u'"
275     hostgroups: postfix-hosts
276     depends: process - postfix - master
277
278   -
279     name: process - postfix - trivial-rewrite
280     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:10 -c 0:15 -u postfix -C trivial-rewrite -a 'trivial-rewrite -n rewrite -t unix -u -c'"
281     hostgroups: postfix-hosts
282     depends: process - postfix - master
283   -
284     name: process - postfix - proxymap
285     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:10 -c 0:15 -u postfix -C proxymap -a 'proxymap -t unix -u'"
286     hostgroups: postfix-hosts
287     depends: process - postfix - master
288   -
289     name: process - postfix - smtpd
290     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:10 -c 0:15 -u postfix -C smtpd -a 'smtpd -n smtp -t inet -u -c'"
291     hostgroups: postfix-hosts
292     depends: process - postfix - master
293   -
294     name: process - postfix - cleanup
295     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:30 -c 0:50 -u postfix -C cleanup -a 'cleanup -z -t unix -u -c'"
296     hostgroups: postfix-hosts
297     depends: process - postfix - master
298   -
299     name: process - postfix - local
300     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:30 -c 0:50 -u postfix -C local -a 'local -t unix'"
301     hostgroups: postfix-hosts
302     depends: process - postfix - master
303
304  ###
305   -
306     name: process - uptimed
307     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u daemon -C uptimed -a '/usr/sbin/uptimed'"
308     hostgroups: computers
309
310
311
312  ############ Processes/Services that only run on some computers ############
313  ####
314  ###
315   -
316     name: process - rngd
317     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C rngd  -a '/usr/sbin/rngd -r /dev/hwrng'"
318     hosts: bartok
319  ###
320   -
321     name: process - sensord
322     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C sensord  -a '/usr/sbin/sensord -f daemon'"
323     hosts: bartok
324
325  ###
326   -
327     name: process - mdadm monitor
328     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C mdadm -a '/sbin/mdadm --monitor --pid-file /var/run/mdadm/monitor.pid --daemonise --scan'"
329     hostgroups: sw-raid
330   -
331     name: RAID - sw raid
332     nrpe: "/usr/lib/nagios/plugins/dsa-check-raid-sw"
333     hostgroups: sw-raid
334
335  ###
336   -
337     name: process - cpqarrayd
338     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C cpqarrayd -a '/usr/sbin/cpqarrayd'"
339     hostgroups: dl385, dl380
340   -
341     name: RAID - arrayprobe
342     nrpe: "sudo /usr/bin/arrayprobe"
343     hostgroups: dl385, dl380
344
345  ###
346   -
347     name: process - slapd
348     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:20 -c 1:50 -u openldap -C slapd -a '/usr/sbin/slapd -g openldap -u openldap'"
349     hosts: samosa
350  ###
351   -
352     name: process - spamd - master
353     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'"
354     hosts: samosa
355   -
356     name: process - spamd - child
357     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:6 -c 1: -C spamd -a 'spamd child'"
358     hosts: samosa
359     depends: process - spamd - master
360  ###
361   -
362     name: process - greylistd
363     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u greylist -C greylistd -a '/usr/bin/python /usr/sbin/greylistd'"
364     hosts: samosa
365  ###
366   -
367     name: process - xinetd
368     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C xinetd -a '/usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive'"
369     hosts: samosa
370  ###
371   -
372     name: network service - finger
373     check: check_tcp!79
374     hosts: samosa
375     depends: process - xinetd
376  ###
377   -
378     name: process - nagios1
379     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u nagios -C nagios -a '/usr/sbin/nagios -d /etc/nagios/nagios.cfg'"
380     hosts: samosa
381   -
382     name: process - nagios3
383     # it forks one instance to check, so make it -w 1:2
384     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:2 -c 1: -u nagios -C nagios3 -a '/usr/sbin/nagios3 -d /etc/nagios3/nagios.cfg'"
385     hosts: samosa
386
387  ###
388   -
389     name: process - apache2 - master
390     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C apache2 -a /usr/sbin/apache2"
391     hostgroups: apache2-hosts
392   -
393     name: process - apache2 - worker
394     nrpe: "/usr/lib/nagios/plugins/check_procs -w 2:50 -c 1:100 -u www-data -C apache2 -a /usr/sbin/apache2"
395     hostgroups: apache2-hosts
396     depends: process - apache2 - master
397   -
398     name: network service - http
399     check: check_http
400     hostgroups: apache2-hosts
401     depends: process - apache2 - master
402   -
403     name: network service - https
404     check: check_https
405     hosts: samosa
406     depends: "process - apache2 - master"
407     normal_check_interval: 120
408     notification_interval: 120
409   -
410     name: network service - https cert
411     check: dsa_check_cert!443
412     hosts: samosa
413     depends: network service - https
414     normal_check_interval: 240
415     notification_interval: 240
416  ####
417   -
418     name: process - named
419     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:15 -c 1: -u bind -C named -a '/usr/sbin/named -u bind'"
420     hostgroups: bind9-hosts
421   -
422     name: network service - dns
423     check: check_dns
424     hostgroups: bind9-hosts
425     depends: process - named