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