Skip to content

Commit c676235

Browse files
author
drn
committed
Added icinga config files and scripts.
git-svn-id: svn+ssh://svn.forge.ecs.soton.ac.uk/projects/ecsrhino/icinga@78 408bdfbd-0bd4-0410-88bf-c0b946b28f18
1 parent 88f6efe commit c676235

26 files changed

+541
-0
lines changed

INFO

+12
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
This folder contains configuration files for Icinga aswell as associated bespoke scripts and applications used by Icinga.
2+
3+
To use the config folder remove /etc/icinga/objects and replace with a symlink. E.g.
4+
5+
ln -s /etc/icinga/objects /home/rhino/icinga/config
6+
7+
8+
nrpe and check_nrpe are binaries for the NRPE server and plugin respectively they are build from the code downloaded at:
9+
10+
https://github.com/KristianLyng/nrpe.git
11+
12+
They were build to run on a Ubuntu 12.04 system with a x65_64 architecture.
13+

config/brain-local_icinga.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define host{
2+
use local-v4-host ; Name of host template to use
3+
display_name Brain Local
4+
host_name brain.ericatherhino.test
5+
alias brain.ericatherhino.test
6+
address 10.0.0.2
7+
parents interface.ericatherhino.test
8+
}
9+

config/brain_icinga.cfg

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
define host{
2+
use generic-host ; Name of host template to use
3+
display_name Brain
4+
host_name brain.ericatherhino.org
5+
alias brain.ericatherhino.org
6+
address 2a01:348:6:86d2:ba27:ebff:feb7:a38c
7+
address6 2a01:348:6:86d2:ba27:ebff:feb7:a38c
8+
parents interface.ericatherhino.org
9+
}
10+
11+
define service {
12+
host_name brain.ericatherhino.org
13+
service_description HTTP-8081
14+
check_command check_http_port_6!8081
15+
use generic-service
16+
notification_interval 0 ; set > 0 if you want to be renotified
17+
}
18+

config/commands_icinga.cfg

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
define command{
2+
command_name check_all_disks_nrpe
3+
command_line /usr/local/bin/check_nrpe -u -H $HOSTADDRESS$ -c check_disk
4+
}
5+
6+
define command{
7+
command_name check_users_nrpe
8+
command_line /usr/local/bin/check_nrpe -u -H $HOSTADDRESS$ -c check_users
9+
}
10+
11+
define command{
12+
command_name check_procs_nrpe
13+
command_line /usr/local/bin/check_nrpe -u -H $HOSTADDRESS$ -c check_total_procs
14+
}
15+
16+
define command{
17+
command_name check_load_nrpe
18+
command_line /usr/local/bin/check_nrpe -u -H $HOSTADDRESS$ -c check_load
19+
}
20+
21+
define command{
22+
command_name check_http_port_6
23+
command_line /usr/lib/nagios/plugins/check_http -p $ARG1$ -H '[$HOSTADDRESS$]' -I '[$HOSTADDRESS$]'
24+
}
25+
26+
define command{
27+
command_name check-host-alive_6
28+
command_line /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS6$' -w 5000,100% -c 5000,100% -p 1 -6
29+
}
30+
31+
define command{
32+
command_name check_ping_6
33+
command_line /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS6$' -w '$ARG1$' -c '$ARG2$' -6
34+
}
35+
36+
define command{
37+
command_name check_by_ssh
38+
command_line /usr/lib/nagios/plugins/check_by_ssh -H '$HOSTADDRESS$' -C '$ARG1$'
39+
}
40+
41+
define command {
42+
command_name check_host_alive_local
43+
command_line /usr/lib/nagios/plugins/check_by_ssh -t 40 -H 'incoming.glacsweb.info' -C "/usr/lib/nagios/plugins/check_by_ssh -t 30 -p 6022 -H erica '/home/nagios/nagios_checks.sh $HOSTADDRESS$'"
44+
}
45+
46+
define command {
47+
command_name check_ping_local
48+
command_line /usr/lib/nagios/plugins/check_by_ssh -t 40 -H 'incoming.glacsweb.info' -C "/usr/lib/nagios/plugins/check_by_ssh -t 30 -p 6022 -H erica '/home/nagios/nagios_checks.sh $HOSTADDRESS$'"
49+
}

config/contacts_icinga.cfg

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
###############################################################################
2+
# contacts.cfg
3+
###############################################################################
4+
5+
6+
7+
###############################################################################
8+
###############################################################################
9+
#
10+
# CONTACTS
11+
#
12+
###############################################################################
13+
###############################################################################
14+
15+
# In this simple config file, a single contact will receive all alerts.
16+
17+
define contact{
18+
contact_name root
19+
alias Root
20+
service_notification_period 24x7
21+
host_notification_period 24x7
22+
service_notification_options w,u,c,r
23+
host_notification_options d,r
24+
service_notification_commands notify-service-by-email
25+
host_notification_commands notify-host-by-email
26+
email root@localhost
27+
}
28+
29+
30+
31+
###############################################################################
32+
###############################################################################
33+
#
34+
# CONTACT GROUPS
35+
#
36+
###############################################################################
37+
###############################################################################
38+
39+
# We only have one contact in this simple configuration file, so there is
40+
# no need to create more than one contact group.
41+
42+
define contactgroup{
43+
contactgroup_name admins
44+
alias Nagios Administrators
45+
members root
46+
}

config/extinfo_icinga.cfg

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
##
2+
## Extended Host and Service Information
3+
##
4+
5+
define hostextinfo{
6+
hostgroup_name linux-servers
7+
notes Linux Servers
8+
icon_image base/linux40.png
9+
icon_image_alt GNU/Linux
10+
vrml_image linux.png
11+
statusmap_image base/linux40.gd2
12+
}
13+
14+
define hostextinfo {
15+
hostgroup_name raspberry-pis
16+
notes Raspberry Pis
17+
icon_image base/raspi.png
18+
icon_image_alt Raspberry Pi (Raspian GNU/Linux)
19+
vrml_image raspi.png
20+
statusmap_image base/raspi.gd2
21+
}
22+

config/generic-host_icinga.cfg

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Generic host definition template - This is NOT a real host, just a template!
2+
3+
define host{
4+
name generic-host ; The name of this host template
5+
notifications_enabled 1 ; Host notifications are enabled
6+
event_handler_enabled 1 ; Host event handler is enabled
7+
flap_detection_enabled 1 ; Flap detection is enabled
8+
failure_prediction_enabled 1 ; Failure prediction is enabled
9+
process_perf_data 1 ; Process performance data
10+
retain_status_information 1 ; Retain status information across program restarts
11+
retain_nonstatus_information 1 ; Retain non-status information across program restarts
12+
check_command check-host-alive
13+
max_check_attempts 10
14+
notification_interval 0
15+
notification_period 24x7
16+
notification_options d,u,r
17+
contact_groups admins
18+
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
19+
}
20+

config/generic-service_icinga.cfg

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# generic service template definition
2+
define service{
3+
name generic-service ; The 'name' of this service template
4+
active_checks_enabled 1 ; Active service checks are enabled
5+
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
6+
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
7+
obsess_over_service 1 ; We should obsess over this service (if necessary)
8+
check_freshness 0 ; Default is to NOT check service 'freshness'
9+
notifications_enabled 1 ; Service notifications are enabled
10+
event_handler_enabled 1 ; Service event handler is enabled
11+
flap_detection_enabled 1 ; Flap detection is enabled
12+
failure_prediction_enabled 1 ; Failure prediction is enabled
13+
process_perf_data 1 ; Process performance data
14+
retain_status_information 1 ; Retain status information across program restarts
15+
retain_nonstatus_information 1 ; Retain non-status information across program restarts
16+
notification_interval 0 ; Only send notifications on status change by default.
17+
is_volatile 0
18+
check_period 24x7
19+
normal_check_interval 5
20+
retry_check_interval 1
21+
max_check_attempts 4
22+
notification_period 24x7
23+
notification_options w,u,c,r
24+
contact_groups admins
25+
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
26+
}

config/hostgroups_icinga.cfg

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Some generic hostgroup definitions
2+
3+
# A simple wildcard hostgroup
4+
define hostgroup {
5+
hostgroup_name all
6+
alias All Servers
7+
members *
8+
}
9+
10+
define hostgroup {
11+
hostgroup_name external-servers
12+
alias External servers
13+
members v6-tunnel-endpoint.ericatherhino.org, v6-pop.ericatherhino.org
14+
}
15+
16+
define hostgroup {
17+
hostgroup_name internal-servers
18+
alias Internal servers
19+
members localhost, brain.ericatherhino.org, interface.ericatherhino.org, left-eye.ericatherhino.org, mech.ericatherhino.org, right-eye.ericatherhino.org
20+
}
21+
22+
define hostgroup {
23+
hostgroup_name raspberry-pis
24+
alias Rapsberry Pis
25+
members brain.ericatherhino.org, interface.ericatherhino.org, left-eye.ericatherhino.org, mech.ericatherhino.org, right-eye.ericatherhino.org, brain.ericatherhino.test, interface.ericatherhino.test, left-eye.ericatherhino.test, mech.ericatherhino.test, right-eye.ericatherhino.test
26+
}
27+
28+
define hostgroup {
29+
hostgroup_name linux-servers
30+
alias Linux-servers
31+
members localhost, v6-tunnel-endpoint.ericatherhino.org, v6-pop.ericatherhino.org, incoming.glacsweb.info
32+
}
33+
34+
define hostgroup {
35+
hostgroup_name http-servers
36+
alias HTTP servers
37+
members localhost
38+
}
39+
40+
define hostgroup {
41+
hostgroup_name v6-servers
42+
alias IPv6 Servers
43+
members brain.ericatherhino.org, interface.ericatherhino.org, left-eye.ericatherhino.org, mech.ericatherhino.org, right-eye.ericatherhino.org, localhost, v6-tunnel-endpoint.ericatherhino.org, v6-pop.ericatherhino.org
44+
}
45+
46+
define hostgroup {
47+
hostgroup_name v4-servers
48+
alias IPv4 Servers
49+
members localhost, v6-pop.ericatherhino.org, incoming.glacsweb.info
50+
}
51+
52+
define hostgroup {
53+
hostgroup_name local-v4-servers
54+
alias Local IPv4 Servers
55+
members brain.ericatherhino.test, interface.ericatherhino.test, left-eye.ericatherhino.test, mech.ericatherhino.test, right-eye.ericatherhino.test
56+
}
57+
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
define host{
2+
use generic-host ; Name of host template to use
3+
display_name V4 Tunnel PoP
4+
host_name incoming.glacsweb.info
5+
alias incoming.glacsweb.info
6+
}
7+
8+
define service {
9+
use generic-service
10+
service_description SSH
11+
host_name incoming.glacsweb.info
12+
check_command check_ssh
13+
}
14+
15+
define service {
16+
use generic-service
17+
service_description SSH-Interface
18+
host_name incoming.glacsweb.info
19+
check_command check_by_ssh!/usr/lib/nagios/plugins/check_ssh -4 -t 10 -p 6022 localhost
20+
}

config/interface-local_icinga.cfg

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
define host{
2+
use local-v4-host ; Name of host template to use
3+
display_name Interface Local
4+
host_name interface.ericatherhino.test
5+
alias interface.ericatherhino.test
6+
address 10.0.0.1
7+
parents incoming.glacsweb.info
8+
}

config/interface_icinga.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define host{
2+
use generic-host ; Name of host template to use
3+
display_name Interface
4+
host_name interface.ericatherhino.org
5+
alias interface.ericatherhino.org
6+
address 2a01:348:6:86d2::1
7+
address6 2a01:348:6:86d2::1
8+
parents v6-tunnel-endpoint.ericatherhino.org
9+
}

config/left-eye-local_icinga.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define host{
2+
use local-v4-host ; Name of host template to use
3+
display_name Left Eye Local
4+
host_name left-eye.ericatherhino.test
5+
alias left-eye.ericatherhino.test
6+
address 10.0.0.4
7+
parents interface.ericatherhino.test
8+
}
9+

config/left-eye_icinga.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define host{
2+
use generic-host ; Name of host template to use
3+
display_name Left Eye
4+
host_name left-eye.ericatherhino.org
5+
alias left-eye.ericatherhino.org
6+
address 2a01:348:6:86d2:ba27:ebff:fe85:b9b3
7+
address6 2a01:348:6:86d2:ba27:ebff:fe85:b9b3
8+
parents interface.ericatherhino.org
9+
}

config/local-v4-host_icinga.cfg

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
define host{
2+
name local-v4-host ; The name of this host template
3+
notifications_enabled 1 ; Host notifications are enabled
4+
event_handler_enabled 1 ; Host event handler is enabled
5+
flap_detection_enabled 1 ; Flap detection is enabled
6+
failure_prediction_enabled 1 ; Failure prediction is enabled
7+
process_perf_data 1 ; Process performance data
8+
retain_status_information 1 ; Retain status information across program restarts
9+
retain_nonstatus_information 1 ; Retain non-status information across program restarts
10+
check_command check_host_alive_local
11+
max_check_attempts 10
12+
notification_interval 0
13+
notification_period 24x7
14+
notification_options d,u,r
15+
contact_groups admins
16+
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
17+
}
18+

config/localhost_icinga.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
define host{
2+
use generic-host ; Name of host template to use
3+
host_name localhost
4+
alias localhost
5+
address 127.0.0.1
6+
address6 ::1
7+
}

config/mech-local_icinga.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define host{
2+
use local-v4-host ; Name of host template to use
3+
display_name Mech Local
4+
host_name mech.ericatherhino.test
5+
alias mech.ericatherhino.test
6+
address 10.0.0.3
7+
parents interface.ericatherhino.test
8+
}
9+

config/mech_icinga.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define host{
2+
use generic-host ; Name of host template to use
3+
display_name Mech
4+
host_name mech.ericatherhino.org
5+
alias mech.ericatherhino.org
6+
address 2a01:348:6:86d2:ba27:ebff:fe64:6e38
7+
address6 2a01:348:6:86d2:ba27:ebff:fe64:6e38
8+
parents interface.ericatherhino.org
9+
}

config/right-eye-local_icinga.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define host{
2+
use local-v4-host ; Name of host template to use
3+
display_name Right Eye Local
4+
host_name right-eye.ericatherhino.test
5+
alias right-eye.ericatherhino.test
6+
address 10.0.0.5
7+
parents interface.ericatherhino.test
8+
}
9+

config/right-eye_icinga.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
define host{
2+
use generic-host ; Name of host template to use
3+
display_name Right Eye
4+
host_name right-eye.ericatherhino.org
5+
alias right-eye.ericatherhino.org
6+
address 2a01:348:6:86d2:ba27:ebff:fe04:dbf4
7+
address6 2a01:348:6:86d2:ba27:ebff:fe04:dbf4
8+
parents interface.ericatherhino.org
9+
}

0 commit comments

Comments
 (0)