1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
|
#
# HOST DEFINITION
#
define host {
use linux-server
host_name gateway
display_name Gateway
address gateway
}
define host {
use linux-server
host_name ap
display_name Acces Point
address ap
}
define host {
use linux-server
host_name internet
display_name Internet edge
address core1-BE1.southbank.ukcore.bt.net
parents gateway
}
define host {
use linux-server
host_name defiant
display_name Defiant
address defiant
}
define host {
use linux-server
host_name firebrand
display_name Firebrand
address firebrand
}
define host {
use linux-server
host_name virtualip
display_name VirtualIP
address virtualip
}
define host {
use linux-server
host_name virtualipin
display_name VirtualIP-In
address virtualipin
}
define host {
use linux-server
host_name virtualipout
display_name VirtualIP-out
address virtualipout
}
#
# HOST GROUP DEFINITION
#
define hostgroup {
hostgroup_name linux-servers
alias Linux Servers
members firebrand,defiant
}
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
#
# Machine state checks
#
define service {
use local-service
host_name gateway,virtualip,internet,ap
hostgroup_name linux-servers
service_description PING
check_command check_ping!100.0,20%!500.0,60%
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=rta%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Current Load
check_command check_load
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=load5%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Current Users
check_command check_users
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=users%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Total Processes
check_command check_procs
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=procs%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Swap Usage
check_command check_swap!20!10
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=swap%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Root Volume
check_command check_disk!15%!10%!/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description PostgreSQL Volume
check_command check_disk!20%!10%!/var/lib/postgresql/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/lib/postgresql%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Portage Volume
check_command check_disk!10%!5%!/usr/portage/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/usr/portage%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Portage Repo
check_command check_file_age!/usr/portage/.git/FETCH_HEAD
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=age%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Apache access
check_command check_file_age!/var/log/apache2/access.log
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=age%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Saved kernel config
check_command check_file_exists!/etc/portage/savedconfig/sys-kernel/gentoo-kernel
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description New kernel config
check_command check_file_no_linger!/etc/portage/savedconfig/sys-kernel/._cfg*_gentoo-kernel
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Sensors
check_command check_sensors
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Cache Volume
check_command check_disk!10%!5%!/var/cache/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/cache%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description DHCPD
check_command check_service!dhcpd4
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Corosync
check_command check_service!corosync
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Pacemaker
check_command check_service!pacemaker
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Kernel version
check_command check_kernel
process_perf_data 0
}
#
# Machine service checks
#
define service {
use local-service
hostgroup_name linux-servers
host_name gateway
service_description SSH
check_command check_ssh
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use local-service
hostgroup_name linux-servers
service_description PostgreSQL
check_command check_pgsql
}
define service {
use local-service
host_name virtualip
service_description PostgreSQL replication
check_command check_pg_repl
action_url /nagiosgraph/cgi-bin/showservice.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&geom=800x170&expand_period=day,week,month,year&period=day,week,month,year
}
define service {
use local-service
hostgroup_name linux-servers
service_description NetFS
check_command check_ice!4000!Service
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=Service%2Cdata&geom=800x180
}
define service {
use local-service
hostgroup_name linux-servers
service_description NetFS-GitFS
check_command check_ice!5000!Service
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=Service%2Cdata&geom=800x180
}
define service {
use local-service
hostgroup_name linux-servers
service_description GB API
check_command check_ice!9001!portage!users!maintenance
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=users%2Cdata&db=portage%2Cdata&db=maintenance%2Cdata&geom=800x180
}
define service {
use local-service
hostgroup_name linux-servers
service_description MirrorSearch API
check_command check_ice!9002!Search
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=Search%2Cdata&geom=800x180
}
define service {
use local-service
hostgroup_name linux-servers
service_description LDAP
check_command check_ldap
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use local-service
hostgroup_name linux-servers
service_description NTP time
check_command check_ntp
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=offset%2Cdata&geom=800x180
}
define service {
use local-service
hostgroup_name linux-servers
service_description DNS
check_command check_dns
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use local-service
hostgroup_name linux-servers
service_description HA Proxy
check_command check_haproxy
process_perf_data 0
max_check_attempts 2
check_interval 1
retry_interval 1
}
define service {
use remote-service
hostgroup_name linux-servers
service_description DRBD
check_command check_drbd
process_perf_data 0
max_check_attempts 2
check_interval 1
retry_interval 1
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Raid
check_command check_raid
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Home mount
check_command check_mount!/home
}
define service {
use remote-service
hostgroup_name linux-servers
service_description WWW mount
check_command check_mount!/var/www/shared
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Git mount
check_command check_mount!/var/git
}
define service {
use remote-service
hostgroup_name linux-servers
service_description mp3s mount
check_command check_mount!/var/mp3s
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Spam Assassin
check_command check_service!spamassassin
process_perf_data 0
}
define service {
use remote-service
host_name virtualipout
service_description Squid
check_command check_tcp!8080
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Fail2ban
check_command check_service!fail2ban
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Clam
check_command check_service!clamav-daemon
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description NSCD
check_command check_service!nscd
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description NSLCD
check_command check_service!nslcd
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description AutoFS
check_command check_service!autofs
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description DistCCD
check_command check_service!distccd
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Cron
check_command check_service!cronie
process_perf_data 0
}
define service {
use remote-service
hostgroup_name linux-servers
service_description Needing restart
check_command check_needrestart
process_perf_data 0
check_interval 30
notifications_enabled 0
}
#
# Cluster state checks
#
define service {
use remote-service
host_name virtualip
service_description Git Volume
check_command check_disk!10%!5%!/var/git/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/git%2Cdata&geom=800x180
}
define service {
use remote-service
host_name virtualip
service_description Home Volume
check_command check_disk!10%!5%!/home/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/home%2Cdata&geom=800x180
}
define service {
use remote-service
host_name virtualip
service_description WWW Volume
check_command check_disk!10%!5%!/var/www/shared/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/www/shared%2Cdata&geom=800x180
}
define service {
use remote-service
host_name virtualip
service_description Store Volume
check_command check_disk!7000!5000!/var/store/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/store%2Cdata&geom=800x180
check_interval 30
}
define service {
use remote-service
host_name virtualip
service_description mp3s Volume
check_command check_disk!500!200!/var/mp3s/
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/mp3s%2Cdata&geom=800x180
}
#
# Cluster services checks
#
define service {
use local-service
host_name virtualipin
service_description HA Proxy stats
check_command check_tcp!9000
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use local-service
host_name virtualipin
service_description HTTPS
check_command check_https
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use local-service
host_name virtualipin,gateway
service_description HTTP
check_command check_http
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use local-service
host_name virtualipin
service_description SMTP
check_command check_smtp
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use local-service
host_name virtualipin
service_description IMAPS
check_command check_simap
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180
}
define service {
use local-service
host_name virtualip
service_description CRM
check_command check_crm
process_perf_data 0
}
define service {
use local-service
host_name virtualip
service_description GlusterFS home
check_command check_glusterfs!home
}
define service {
use local-service
host_name virtualip
service_description GlusterFS git
check_command check_glusterfs!git
}
define service {
use local-service
host_name virtualip
service_description GlusterFS store
check_command check_glusterfs_nospace!store
}
define service {
use local-service
host_name virtualip
service_description GlusterFS www
check_command check_glusterfs!www
}
#
# Passive checks
#
define command {
command_name passive-only
command_line /usr/lib64/nagios/plugins/check_dummy 3 "Unknown: passive-only"
}
define service {
use generic-service
name passive-service
register 0
active_checks_enabled 0
passive_checks_enabled 1
check_command passive-only
}
define service {
use passive-service
host_name firebrand
service_description GB API Package Updates
check_freshness 1
freshness_threshold 3600
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&geom=800x180
}
define service {
use passive-service
host_name firebrand
service_description GB API Bug Updates
check_freshness 1
freshness_threshold 3600
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&geom=800x180
}
define service {
use passive-service
host_name virtualip
service_description Backup Volume
check_freshness 1
freshness_threshold 86400
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/backup%2Cdata&geom=800x180
}
|