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