[project @ peter@palfrader.org-20080403124917-a3g07ry8xpjp6ygq]
[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   -
281     name: process - spamd - child
282     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:6 -c 1: -C spamd -a 'spamd child'"
283     hosts: samosa
284     depends: process - spamd - master
285  ###
286   -
287     name: process - greylistd
288     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u greylist -C greylistd -a '/usr/bin/python /usr/sbin/greylistd'"
289     hosts: samosa
290
291  ###
292   -
293     name: process - postfix - master
294     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C master -a '/usr/lib/postfix/master'"
295     hostgroups: postfix-hosts
296   -
297     name: process - postfix - qmgr
298     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C qmgr -a 'qmgr -l -t fifo -u'"
299     hostgroups: postfix-hosts
300     depends: process - postfix - master
301   #-
302   #  name: process - postfix - tlsmgr
303   #  nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C tlsmgr -a 'tlsmgr -l -t fifo -u'"
304   #  hostgroups: postfix-hosts
305   #  depends: process - postfix - master
306   -
307     name: process - postfix - pickup
308     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C pickup -a 'pickup -l -t fifo -u -c'"
309     hostgroups: postfix-hosts
310     depends: process - postfix - master
311   -
312     name: process - postfix - anvil
313     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u postfix -C anvil -a 'anvil -l -t unix -u'"
314     hostgroups: postfix-hosts
315     depends: process - postfix - master
316
317   -
318     name: process - postfix - trivial-rewrite
319     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'"
320     hostgroups: postfix-hosts
321     depends: process - postfix - master
322   -
323     name: process - postfix - proxymap
324     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:10 -c 0:15 -u postfix -C proxymap -a 'proxymap -t unix -u'"
325     hostgroups: postfix-hosts
326     depends: process - postfix - master
327   -
328     name: process - postfix - smtpd
329     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'"
330     hostgroups: postfix-hosts
331     depends: process - postfix - master
332   -
333     name: process - postfix - cleanup
334     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:30 -c 0:50 -u postfix -C cleanup -a 'cleanup -z -t unix -u -c'"
335     hostgroups: postfix-hosts
336     depends: process - postfix - master
337   -
338     name: process - postfix - local
339     nrpe: "/usr/lib/nagios/plugins/check_procs -w 0:30 -c 0:50 -u postfix -C local -a 'local -t unix'"
340     hostgroups: postfix-hosts
341     depends: process - postfix - master
342
343
344
345  ###
346   -
347     name: process - uptimed
348     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u daemon -C uptimed -a '/usr/sbin/uptimed'"
349     hostgroups: computers
350
351
352
353  ############ Processes/Services that only run on some computers ############
354  ####
355  ###
356   -
357     name: process - rngd
358     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C rngd  -a '/usr/sbin/rngd -r /dev/hwrng'"
359     hosts: bartok
360  ###
361   -
362     name: process - sensord
363     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C sensord  -a '/usr/sbin/sensord -f daemon'"
364     hosts: bartok
365
366  ###
367   -
368     name: process - mdadm monitor
369     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'"
370     hostgroups: sw-raid
371   -
372     name: RAID - sw raid
373     nrpe: "/usr/lib/nagios/plugins/dsa-check-raid-sw"
374     hostgroups: sw-raid
375
376  ###
377   -
378     name: process - cpqarrayd
379     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C cpqarrayd -a '/usr/sbin/cpqarrayd'"
380     hostgroups: dl385, dl380
381   -
382     name: RAID - arrayprobe
383     nrpe: "sudo /usr/bin/arrayprobe"
384     hostgroups: dl385, dl380
385
386  ###
387   -
388     name: process - slapd
389     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'"
390     hosts: samosa
391  ###
392   -
393     name: process - xinetd
394     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'"
395     hosts: samosa
396  ###
397   -
398     name: network service - finger
399     check: check_tcp!79
400     hosts: samosa
401     depends: process - xinetd
402  ###
403   -
404     name: process - nagios1
405     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'"
406     hosts: samosa
407   -
408     name: process - nagios3
409     # it forks one instance to check, so make it -w 1:2
410     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'"
411     hosts: samosa
412
413  ###
414   -
415     name: process - apache2 - master
416     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u root -C apache2 -a /usr/sbin/apache2"
417     hostgroups: apache2-hosts
418   -
419     name: process - apache2 - worker
420     nrpe: "/usr/lib/nagios/plugins/check_procs -w 2:50 -c 1:100 -u www-data -C apache2 -a /usr/sbin/apache2"
421     hostgroups: apache2-hosts
422     depends: process - apache2 - master
423   -
424     name: network service - http
425     check: check_http
426     hostgroups: apache2-hosts
427     depends: process - apache2 - master
428   -
429     name: network service - https
430     check: check_https
431     hosts: samosa
432     depends: "process - apache2 - master"
433     normal_check_interval: 120
434     notification_interval: 120
435   -
436     name: network service - https cert
437     check: dsa_check_cert!443
438     hosts: samosa
439     depends: network service - https
440     normal_check_interval: 240
441     notification_interval: 240
442  ####
443   -
444     name: process - named
445     nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:15 -c 1: -u bind -C named -a '/usr/sbin/named -u bind'"
446     hostgroups: bind9-hosts
447   -
448     name: network service - dns
449     check: check_dns
450     hostgroups: bind9-hosts
451     depends: process - named