summaryrefslogtreecommitdiff
blob: 35f7db278a31fce3a70fa3109ccb38c73d76139e (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
# Accessing JSON data works via status_data
# Return State::UP, State::Down, or State::Warning
# Nagios states: 0 (ok), 1 (warning), 2 (critical), 3 (unknown), 4 (dependent)

Services do
	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

	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

	service 'wiki' do
		default 'hen', 'http_wiki'
	end

	service 'planet' do
		default 'kookaburra', 'http_planet'
	end

	service 'pgo' do
		default 'brambling', 'http_packages'
	end

	service 'lists' do
		default 'pigeon', 'smtp_lists'
	end

	service 'archives' do
		default 'finch'
	end

	service 'cvs' do
		default 'flycatcher', 'ssh_cvs'
	end

	service 'devmanual' do
		default 'brambling', 'http_devmanual'
	end

	service 'overlays' do
		default 'spoonbill', 'http_overlays'
	end
	
	service 'tinderbox' do
		default 'tinderbox.dev'
	end

	service 'sources' do
		default 'motmot', 'http_sources'
	end

	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

	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

	service 'dgo_ssh' do
		default 'woodpecker', 'ssh_dgo'
	end
	
	service 'dgo_http' do
		default 'woodpecker', 'http_dev_ssl'
	end

	service 'dgo_smtp' do
		default 'woodpecker', 'smtp_dgo'
	end

	service 'dgo_mbox' do
		default 'woodpecker', 'imap_dgo'
	end
end