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