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