[project @ peter@palfrader.org-20080403175038-j19wzzxw5njejb9v]
[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 # TODO
8 #  - raff:  identd, hpasmd
9 #  - *: mailq
10
11 ---
12 #############################
13 # hosts
14 #############################
15 servers:
16   gw-MAN-DA-debian:
17     address: 82.195.75.126
18     parents: gw-HP-ftc
19     hostgroups: routing-infrastructure
20   gw-HP-ftc:
21     address: 192.25.206.1
22     parents: samosa
23     hostgroups: routing-infrastructure
24   gw-brainfood:
25     address: 70.103.162.1
26     parents: gw-HP-ftc
27     hostgroups: routing-infrastructure
28   gw-brown.edu:
29     address: 128.148.34.1
30     parents: gw-HP-ftc
31     hostgroups: routing-infrastructure
32   gw-osuosl:
33     address: 140.211.166.1
34     parents: gw-HP-ftc
35     hostgroups: routing-infrastructure
36
37   samosa:
38     address: 192.25.206.57
39     hostgroups: computers, dl380, apache2-hosts, bind9-hosts
40   raff:
41     address: 192.25.206.59
42     parents: samosa
43     hostgroups: computers, dl380, apache1-hosts, bind9-hosts, rsyncd-hosts
44
45   bartok:
46     address: 82.195.75.91
47     parents: gw-MAN-DA-debian
48     hostgroups: computers, syslog-ng-hosts, postfix-hosts, dl385
49   sperger:
50     address: 82.195.75.98
51     parents: gw-MAN-DA-debian
52     hostgroups: computers, porterbox, sw-raid
53
54   master:
55     address: 70.103.162.29
56     parents: gw-brainfood
57     hostgroups: computers, apache2-hosts, bind9-hosts
58
59   ries:
60     address: 128.148.34.103
61     parents: gw-osuosl
62     hostgroups: computers, apache2-hosts, bind9-hosts, ftpd-hosts, dl385, rsyncd-hosts
63
64   rietz:
65     address: 140.211.166.43
66     parents: gw-brown.edu
67     hostgroups: computers, apache2-hosts, bind9-hosts, rsyncd-hosts, dl385
68   rietz2:
69     address: 140.211.166.44
70     parents: rietz
71     hostgroups: secondary-IPs
72
73 #############################
74 # host groups
75 #
76 # hostgroups ircd and all are automatically defined
77 #
78 #############################
79 hostgroups:
80   computers:
81     alias: computers
82     private: 1
83   routing-infrastructure:
84     alias: Internet routers and friends
85     extinfo-icon_image: base/switch40.png
86     extinfo-icon_image_alt: router
87
88   porterbox:
89     alias: developer accessible porter machien
90     extinfo-icon_image: base/debian.png
91     extinfo-icon_image_alt: Debian GNU/Linux
92     extinfo-notes_url: http://db.debian.org/machines.cgi?host=%s
93
94   dl380:
95     alias: HP DL380 hosts
96     private: 1
97   dl385:
98     alias: HP DL385 hosts
99     private: 1
100   sw-raid:
101     alias: Hosts with Linux software raid
102     private: 1
103
104   syslog-ng-hosts:
105     alias: hosts running syslog-ng instead of sysklogd
106     private: 1
107   postfix-hosts:
108     alias: hosts running postfix instead of exim
109     private: 1
110   apache2-hosts:
111     alias: hosts running apache2
112     private: 1
113   apache1-hosts:
114     alias: hosts running apache1
115     private: 1
116   bind9-hosts:
117     alias: hosts running bind9
118     private: 1
119   ftpd-hosts:
120     alias: hosts running vsftpd
121     private: 1
122   rsyncd-hosts:
123     alias: hosts providing rsync services via xinetd
124     private: 1
125
126   secondary-IPs:
127     alias: secondary IP addresses
128     private: 1
129
130 #############################
131 # services
132 #############################
133 services:
134   -
135     name: PING
136     check: "check_ping!300.0,20%!600.0,40%"
137     hostgroups: all
138
139  ############ Services ############
140  ###
141
142  ############ Disk Usage ############
143  ####
144   -
145     name: disk usage - all
146     nrpe: "/usr/lib/nagios/plugins/check_disk 90 95"
147     hostgroups: computers
148   -
149     name: disk usage on /
150     nrpe: "/usr/lib/nagios/plugins/check_disk 60 80 /"
151     hostgroups: computers
152   -
153     name: disk usage on /boot
154     nrpe: "/usr/lib/nagios/plugins/check_disk 60 80 /boot"
155     hosts: sperger
156   -
157     name: disk usage on /var
158     nrpe: "/usr/lib/nagios/plugins/check_disk 50 75 /var"
159     hosts: bartok, samosa
160   -
161     name: disk usage on /org
162     nrpe: "/usr/lib/nagios/plugins/check_disk 80 90 /org"
163     hosts: bartok, sperger, samosa
164   -
165     name: disk usage on /tmp
166     nrpe: "/usr/lib/nagios/plugins/check_disk 60 80 /tmp"
167     hosts: samosa
168   -
169     name: disk usage on /usr
170     nrpe: "/usr/lib/nagios/plugins/check_disk 75 90 /usr"
171     hosts: samosa
172
173  ############ All Computers ############
174  ####
175   #-
176   #  name: apt - security updates
177   #  nrpe: "/usr/local/bin/nagios-check-apt-updates --warnifupdates"
178   #  hostgroups: computers
179   #  normal_check_interval: 480
180   #  notification_interval: 480
181   #  max_check_attempts: 4
182   #  retry_check_interval: 12
183  ####
184   -
185     name: users
186     nrpe: "/usr/lib/nagios/plugins/check_users 30 35"
187     hostgroups: computers
188  ####
189   -
190     name: load
191     nrpe: "/usr/lib/nagios/plugins/check_load -w 12,10,8 -c 22,18,14"
192     hostgroups: computers
193  ####
194   -
195     name: processes - zombies
196     nrpe: "/usr/lib/nagios/plugins/check_procs 5 10 -s Z"
197     hostgroups: computers
198  ####
199   -
200     name: processes - total
201     nrpe: "/usr/lib/nagios/plugins/check_procs 620 700"
202     hostgroups: computers
203  ####
204   -
205     name: swap usage - percent
206     nrpe: "/usr/lib/nagios/plugins/check_swap -w 20% -c 10%"
207     hostgroups: computers
208  ####
209   -
210     name: swap usage - mb
211     nrpe: "/usr/lib/nagios/plugins/check_swap -w 20000 -c 5000"
212     hostgroups: computers
213  ####
214   -
215     name: process - getty
216     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:8 -c 1: -u root -C getty -a /sbin/getty"
217     hostgroups: computers
218  ####
219   -
220     name: process - sshd
221     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:20 -c 1: -u root -C sshd -a '/usr/sbin/sshd'"
222     hostgroups: computers
223   -
224     name: "network service - sshd"
225     check: check_ssh
226     hostgroups: computers
227     depends: process - sshd
228     normal_check_interval:  60
229     notification_interval:  60
230  ####
231   -
232     name: network service - nrpe
233     check: check_tcp!5666
234     hostgroups: computers
235     max_check_attempts: -1
236   -
237     name: process - nrpe
238     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'"
239     hostgroups: computers
240     depends: network service - nrpe
241  ###
242   -
243     name: process - munin-node
244     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:2 -c 1: -u root -C munin-node -a '/usr/sbin/munin-node'"
245     hostgroups: computers
246   -
247     name: network service - munin-node
248     check: check_tcp!4949
249     hostgroups: computers
250     depends: process - munin-node
251  ###
252   -
253     name: process - ntpd
254     # 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'"
255     # 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'"
256     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -C ntpd -a '/usr/sbin/ntpd -p /var/run/ntpd.pid'"
257     hostgroups: computers
258   -
259     name: network service - ntp
260     check: check_ntp
261     hostgroups: computers
262     depends: process - ntpd
263  ###
264   -
265     name: process - atd
266     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u daemon -C atd -a /usr/sbin/atd"
267     hostgroups: computers
268  ###
269   -
270     name: process - cron
271     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C cron -a /usr/sbin/cron"
272     hostgroups: computers
273
274  ###
275   -
276     name: process - syslog-ng
277     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'"
278     hostgroups: syslog-ng-hosts
279  ###
280   -
281     name: process - syslogd
282     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C syslogd  -a '/sbin/syslogd'"
283     hostgroups: computers
284     excludehostgroups: syslog-ng-hosts
285   -
286     name: process - klogd
287     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C klogd  -a '/sbin/klogd -x'"
288     hostgroups: computers
289     excludehostgroups: syslog-ng-hosts
290
291  ### MAIL STUFF
292  ###
293   -
294     name: process - exim
295     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u Debian-exim -C exim4 -a '/usr/sbin/exim4 -bd -q'"
296     hostgroups: computers
297     excludehostgroups: postfix-hosts
298     excludehosts: master, rietz
299   -
300     name: process - exim - total
301     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:50 -c 1: -C exim4"
302     hostgroups: computers
303     excludehostgroups: postfix-hosts
304     excludehosts: master, rietz
305   -
306     name: process - exim
307     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:300 -c 1:500 -C exim4 -a '/usr/sbin/exim4'"
308     hosts: master, rietz
309  ###
310   -
311     name: process - clamav - clamd
312     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:2 -c 1: -u clamav -C clamd -a '/usr/sbin/clamd'"
313     hostgroups: computers
314     excludehostgroups: postfix-hosts
315   -
316     name: service - clamav
317     nrpe: "/usr/lib/nagios/plugins/check_clamd -H /var/run/clamav/clamd.ctl"
318     hostgroups: computers
319     excludehostgroups: postfix-hosts
320     depends: process - clamav - clamd
321   -
322     name: process - clamav - freshclam
323     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u clamav -C freshclam -a '/usr/bin/freshclam -d --quiet'"
324     hostgroups: computers
325     excludehostgroups: postfix-hosts
326  ###
327   -
328     name: process - spamd - master
329     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'"
330     #hosts: samosa
331     hostgroups: computers
332     excludehostgroups: postfix-hosts
333     excludehosts: rietz
334   -
335     name: process - spamd - child
336     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:6 -c 1: -C spamd -a 'spamd child'"
337     hostgroups: computers
338     excludehostgroups: postfix-hosts
339     depends: process - spamd - master
340     excludehosts: rietz
341   #
342   -
343     name: process - spamd - master
344     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u debbugs -C spamd -a '/usr/sbin/spamd -d '"
345     hosts: rietz
346   -
347     name: process - spamd - child
348     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:6 -c 1: -u debbugs -C spamd -a 'spamd child'"
349     hosts: rietz
350
351  ###
352   -
353     name: process - greylistd
354     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u greylist -C greylistd -a '/usr/bin/python /usr/sbin/greylistd'"
355     hostgroups: computers
356     excludehostgroups: postfix-hosts
357
358  ###
359   -
360     name: process - postfix - master
361     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C master -a '/usr/lib/postfix/master'"
362     hostgroups: postfix-hosts
363   -
364     name: process - postfix - qmgr
365     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C qmgr -a 'qmgr -l -t fifo -u'"
366     hostgroups: postfix-hosts
367     depends: process - postfix - master
368   #-
369   #  name: process - postfix - tlsmgr
370   #  nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C tlsmgr -a 'tlsmgr -l -t fifo -u'"
371   #  hostgroups: postfix-hosts
372   #  depends: process - postfix - master
373   -
374     name: process - postfix - pickup
375     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C pickup -a 'pickup -l -t fifo -u -c'"
376     hostgroups: postfix-hosts
377     depends: process - postfix - master
378   -
379     name: process - postfix - anvil
380     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C anvil -a 'anvil -l -t unix -u'"
381     hostgroups: postfix-hosts
382     depends: process - postfix - master
383
384   -
385     name: process - postfix - trivial-rewrite
386     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'"
387     hostgroups: postfix-hosts
388     depends: process - postfix - master
389   -
390     name: process - postfix - proxymap
391     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:10 -c 0:15 -u postfix -C proxymap -a 'proxymap -t unix -u'"
392     hostgroups: postfix-hosts
393     depends: process - postfix - master
394   -
395     name: process - postfix - smtpd
396     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'"
397     hostgroups: postfix-hosts
398     depends: process - postfix - master
399   -
400     name: process - postfix - cleanup
401     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:30 -c 0:50 -u postfix -C cleanup -a 'cleanup -z -t unix -u -c'"
402     hostgroups: postfix-hosts
403     depends: process - postfix - master
404   -
405     name: process - postfix - local
406     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:30 -c 0:50 -u postfix -C local -a 'local -t unix'"
407     hostgroups: postfix-hosts
408     depends: process - postfix - master
409
410
411
412  ###
413   -
414     name: process - uptimed
415     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u daemon -C uptimed -a '/usr/sbin/uptimed'"
416     hostgroups: computers
417  ###
418   -
419     name: process - irqbalance
420     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C irqbalance -a '/usr/sbin/irqbalance'"
421     hostgroups: computers
422
423
424
425  ############ Processes/Services that only run on some computers ############
426  ####
427  ###
428   -
429     name: process - rngd
430     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C rngd  -a '/usr/sbin/rngd -r /dev/hwrng'"
431     hosts: bartok
432  ###
433   -
434     name: process - sensord
435     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C sensord  -a '/usr/sbin/sensord -f daemon'"
436     hosts: bartok
437
438  ###
439   -
440     name: process - mdadm monitor
441     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'"
442     hostgroups: sw-raid
443   -
444     name: RAID - sw raid
445     nrpe: "/usr/lib/nagios/plugins/dsa-check-raid-sw"
446     hostgroups: sw-raid
447
448  ###
449   -
450     name: process - cpqarrayd
451     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C cpqarrayd -a '/usr/sbin/cpqarrayd'"
452     hostgroups: dl385, dl380
453   -
454     name: RAID - arrayprobe
455     nrpe: "sudo /usr/bin/arrayprobe"
456     hostgroups: dl385, dl380
457
458  ###
459   -
460     name: process - slapd
461     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'"
462     hosts: samosa
463  ###
464   -
465     name: process - udevd
466     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C udevd -a 'udevd'"
467     hosts: sperger, ries
468  ###
469   -
470     name: process - acpid
471     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C acpid -a '/usr/sbin/acpid -c /etc/acpi/events -s /var/run/acpid.socket'"
472     hosts: ries
473
474  ###
475   -
476     name: process - xinetd
477     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'"
478     hosts: samosa
479     hostgroups: rsyncd-hosts
480  ###
481   -
482     name: network service - finger
483     check: check_tcp!79
484     hosts: samosa
485     depends: process - xinetd
486  ###
487   -
488     name: network service - rsync
489     check: check_tcp!873
490     hostgroups: rsyncd-hosts
491     depends: process - xinetd
492
493   -
494     name: network service - rsync
495     check: check_tcp!873
496     hosts: rietz2
497     depends: rietz:process - xinetd
498
499  ###
500   -
501     name: process - nagios1
502     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'"
503     hosts: samosa
504   -
505     name: process - nagios3
506     # it forks one instance to check, so make it -w 1:2
507     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'"
508     hosts: samosa
509
510  ###
511   -
512     name: process - apache2 - master
513     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C apache2 -a /usr/sbin/apache2"
514     hostgroups: apache2-hosts
515   -
516     name: process - apache2 - worker
517     nrpe: "/usr/lib/nagios/plugins/check_procs -w 2:50 -c 1:100 -u www-data -C apache2 -a /usr/sbin/apache2"
518     hostgroups: apache2-hosts
519     depends: process - apache2 - master
520   -
521     name: network service - http
522     check: check_http
523     hostgroups: apache2-hosts
524     depends: process - apache2 - master
525
526
527
528   -
529     name: process - apache - master
530     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C apache -a /usr/sbin/apache"
531     hostgroups: apache1-hosts
532   -
533     name: process - apache - worker
534     nrpe: "/usr/lib/nagios/plugins/check_procs -w 2:50 -c 1:100 -u www-data -C apache -a /usr/sbin/apache"
535     hostgroups: apache1-hosts
536     depends: process - apache - master
537   -
538     name: network service - http
539     check: check_http
540     hostgroups: apache1-hosts
541     depends: process - apache - master
542
543   -
544     name: network service - http keyserver
545     check: dsa_check_http_port!11371
546     hosts: raff
547     depends: process - apache - master
548
549   -
550     name: network service - https
551     check: check_https
552     hosts: samosa
553     depends: "process - apache2 - master"
554     normal_check_interval: 120
555     notification_interval: 120
556   -
557     name: network service - https cert
558     check: dsa_check_cert!443
559     hosts: samosa
560     depends: network service - https
561     normal_check_interval: 240
562     notification_interval: 240
563  ####
564   -
565     name: process - named
566     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:15 -c 1: -u bind -C named -a '/usr/sbin/named -u bind'"
567     hostgroups: bind9-hosts
568   -
569     name: network service - dns
570     check: check_dns
571     hostgroups: bind9-hosts
572     depends: process - named
573
574  ####
575   -
576     name: process - vsftp - listener
577     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C vsftpd -a 'vsftpd: LISTENER'"
578     hostgroups: ftpd-hosts
579   -
580     name: process - vsftp - instance
581     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:10 -c 0:30 -u ftp -C vsftpd -a 'vsftpd: '"
582     hostgroups: ftpd-hosts
583   -
584     name: network service - ftp
585     check: check_ftp
586     hostgroups: ftpd-hosts
587     depends: process - vsftp - listener
588
589  ####
590   -
591     name: process - debianqueued
592     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u dak -C debianqueued -a '/usr/bin/perl -w ./debianqueued'"
593     hosts: ries