summaryrefslogtreecommitdiff
blob: 95f38a9946e5c6cc376b0458dcc91bd0dd45335b (plain)
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
# Accessing JSON data works via status_data
# Return State::UP, State::Down, or State::Warning
# Icinga states: 0 (ok), 1 (warning), 2 (critical), 3 (unknown), 4 (dependent)
###############################################################################
# IMPORTANT: Make your changes as well in monitoring:/etc/aggregate-icinga-data.conf

Services do
	name 'gentoo.org Website'
	service 'www' do
		if service_flapping? 'avocet', 'http_www' and service_flapping? 'auklet', 'http_www'
			State::WARNING
		elsif service_up? 'avocet', 'http_www' or service_up? 'auklet', 'http_www'
			State::UP
		else
			State::DOWN
		end
	end

	name 'Forums'
	service 'forums' do
		if service_flapping? 'godwit', 'http_forums' or service_flapping? 'gannet', 'http_forums'
			State::WARNING
		elsif service_up? 'godwit', 'http_forums' or service_up? 'gannet', 'http_forums'
			State::UP
		else
			State::DOWN
		end
	end

	name 'Wiki'
	service 'wiki' do
		default 'geese', 'http_wiki'
	end

	name 'Planet Gentoo'
	service 'planet' do
		default 'kookaburra', 'http_planet'
	end

	name 'Package Database'
	service 'pgo' do
		default 'brambling', 'http_packages'
	end

	name 'Mailing Lists'
	service 'lists' do
		default 'pigeon', 'smtp_lists'
	end

	name 'Mailing List Archives'
	service 'archives' do # archives.gentoo.org
		default 'finch'
	end

	name 'CVS Server'
	service 'cvs' do
		default 'oystercatcher', 'ssh_cvs'
	end

	name 'Developer Manual'
	service 'devmanual' do
		default 'brambling', 'http_devmanual'
	end

	name 'Overlays'
	service 'overlays' do
		default 'oystercatcher', 'http_overlays'
	end
	
	name 'Source Code Browser'
	service 'sources' do
		default 'motmot', 'http_sources'
	end

	name 'Master <kbd>rsync</kbd> Mirror'
	service 'rsync' do # master rsync
		if host_flapping? 'albatross' or host_flapping? 'dipper'
			State::WARNING
		elsif host_up? 'albatross' and host_up? 'dipper'
			State::UP
		else
			State::DOWN
		end
	end

	name 'Bugzilla'
	service 'bugzilla' do
		if service_flapping? 'yellowbishop', 'http_bugs' or service_flapping? 'yellowleg', 'http_bugs'
			State::WARNING
		elsif service_up? 'yellowbishop', 'http_bugs' and service_up? 'yellowleg', 'http_bugs'
			State::UP
		elsif service_up? 'yellowbishop', 'http_bugs' or service_up? 'yellowleg', 'http_bugs'
			State::WARNING
		else
			State::DOWN
		end
	end

	name '<kbd>dev.gentoo.org</kbd> Shell Access'
	service 'dgo_ssh' do # dev.gentoo.org SSH
		default 'woodpecker', 'ssh_dgo'
	end
	
	name '<kbd>dev.gentoo.org</kbd> Web Hosting'
	service 'dgo_http' do # dev.gentoo.org HTTP
		default 'woodpecker', 'http_dev_ssl'
	end

	name 'In-/Outbound Email (SMTP)'
	service 'dgo_smtp' do # dev.gentoo.org SMTP
		default 'woodpecker', 'smtp_dgo'
	end

	name 'Mailbox Access (POP/IMAP)'
	service 'dgo_mbox' do # dev.gentoo.org IMAP/POP
		default 'woodpecker', 'imap_dgo'
	end
end