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