diff options
author | Alex Legler <alex@a3li.li> | 2013-11-11 11:33:12 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2013-11-11 11:33:12 +0100 |
commit | d733c0abf2d568319d3b19e8806816346760737e (patch) | |
tree | 446dcee6f606ecc95db2e66ad393925d89372622 /data | |
parent | .gitignore (diff) | |
download | infra-status-d733c0abf2d568319d3b19e8806816346760737e.tar.gz infra-status-d733c0abf2d568319d3b19e8806816346760737e.tar.bz2 infra-status-d733c0abf2d568319d3b19e8806816346760737e.zip |
v2
Diffstat (limited to 'data')
-rw-r--r-- | data/.gitignore | 1 | ||||
-rw-r--r-- | data/notices/.gitignore | 1 | ||||
-rw-r--r-- | data/services.rb | 103 |
3 files changed, 105 insertions, 0 deletions
diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..a574e5e --- /dev/null +++ b/data/.gitignore @@ -0,0 +1 @@ +status.json diff --git a/data/notices/.gitignore b/data/notices/.gitignore new file mode 100644 index 0000000..2211df6 --- /dev/null +++ b/data/notices/.gitignore @@ -0,0 +1 @@ +*.txt diff --git a/data/services.rb b/data/services.rb new file mode 100644 index 0000000..435220c --- /dev/null +++ b/data/services.rb @@ -0,0 +1,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 'kookaburra', 'http_devmanual' + end + + service 'overlays' do + default 'hornbill', '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? 'kookaburra' + State::WARNING + elsif host_up? 'albatross' and host_up? 'kookaburra' + 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 |