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