summaryrefslogtreecommitdiff
blob: 4146c003cb09606aaec15f8d1b8153fb5e67e624 (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
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
# 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 'brambling', 'http_planet'
	end

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

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

	name 'Mailing List Archives'
	service 'archives' do
		default 'manakin', 'http_archives'
	end

	name 'CVS and Git Repositories'
	service 'vcs' do
		default 'oystercatcher', 'ssh_cvs'
	end

	name 'Anonymous Repository Access'
	service 'anonvcs' do
		if service_flapping? 'manakin', 'http_anongit' or service_flapping? 'oystercatcher', 'http_anongit'
			State::WARNING
		elsif service_up? 'manakin', 'http_anongit' or service_up? 'oystercatcher', 'http_anongit'
			State::UP
		else
			State::DOWN
		end
	end

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

	name 'Git Source Code Browser'
	service 'gitweb' do
		default 'manakin', 'http_gitweb'
	end

	name 'CVS Source Code Browser'
	service 'sources' do
		default 'motmot', 'http_sources'
	end

	name 'rsync Mirrors'
	service 'rsync' do
		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 'Distfile Mirrors'
	service 'distfiles' do
		if host_flapping? 'dipper'
			State::WARNING
		elsif host_up? 'dipper'
			State::UP
		else
			State::DOWN
		end
	end

	name 'Bugzilla'
	service 'bugzilla' do
		default 'gannet', 'http_bugs'
	end

	name 'Project File Hosting'
	service 'projects' do
		default 'dipper', 'http_projects'
	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_dgo'
	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

	name 'Blog Hosting'
	service 'blogs' do
		default 'bittern', 'http_blogs'
	end

	category 'Community Services' do
		column 1
		%w[www forums wiki planet pgo lists archives]
	end

	category 'Development Services' do
		column 2
		%w[bugzilla devmanual projects]
	end

	category 'Code Repositories' do
		column 2
		%w[vcs anonvcs gitweb sources]
	end

	category 'Developer Resources' do
		column 3
		%w[dgo_ssh dgo_http dgo_smtp dgo_mbox blogs]
	end

	category 'Mirrors' do
		column 3
		%w[rsync distfiles]
	end
end