Faidon Liambotis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87633
Change subject: swift: fix swift::proxy::monitoring for eqiad
......................................................................
swift: fix swift::proxy::monitoring for eqiad
First of all, check the well-known /monitoring/backend instead of
/wikipedia/commons/thumb/a/a2/Little_kitten_.jpg/80px-Little_kitten_.jpg
which may or may not exist (duh!)
Second, check with the respective address for each cluster and remove
the silly check_http_swift ad-hoc check but use the standard
check_http_url.
Third, let's add checks for the proxies (/monitoring/frontend) while
we're at it as to ease future troubleshooting.
Change-Id: I4b38eb14b7a6861259cf3ee3c118b2730a775fde
---
M manifests/role/swift.pp
M manifests/swift.pp
M templates/icinga/checkcommands.cfg.erb
3 files changed, 16 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/33/87633/1
diff --git a/manifests/role/swift.pp b/manifests/role/swift.pp
index 8726a82..222cd2d 100644
--- a/manifests/role/swift.pp
+++ b/manifests/role/swift.pp
@@ -50,7 +50,10 @@
backend_url_format => "sitelang"
}
include ::swift::proxy
- include ::swift::proxy::monitoring
+ class { '::swift::proxy::monitoring':
+ host => 'ms-fe.pmtpa.wmnet',
+ }
+
}
class storage inherits role::swift::pmtpa-prod {
include ::swift::storage
@@ -98,7 +101,9 @@
backend_url_format => "sitelang"
}
include ::swift::proxy
- include ::swift::proxy::monitoring
+ class { '::swift::proxy::monitoring':
+ host => 'ms-fe.eqiad.wmnet',
+ }
}
class storage inherits role::swift::eqiad-prod {
include ::swift::storage
diff --git a/manifests/swift.pp b/manifests/swift.pp
index d582c7c..2e8e34a 100644
--- a/manifests/swift.pp
+++ b/manifests/swift.pp
@@ -94,8 +94,6 @@
system_role { "swift:base": description => "swift frontend proxy" }
- include swift::proxy::monitoring
-
realize File["/etc/swift/proxy-server.conf"]
package { ['swift-proxy', 'python-swauth']:
@@ -114,10 +112,15 @@
}
}
-class swift::proxy::monitoring {
-
- monitor_service { "swift http": description => "Swift HTTP",
check_command => "check_http_swift!80" }
-
+class swift::proxy::monitoring($host) {
+ monitor_service { 'swift-http-frontend':
+ description => 'Swift HTTP frontend',
+ check_command => "check_http_url!$host!/monitoring/frontend",
+ }
+ monitor_service { 'swift-http-backend':
+ description => 'Swift HTTP backend',
+ check_command => "check_http_url!$host!/monitoring/backend",
+ }
}
# TODO: document parameters
diff --git a/templates/icinga/checkcommands.cfg.erb
b/templates/icinga/checkcommands.cfg.erb
index c9d5ea7..259022c 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -315,13 +315,6 @@
command_name check_http_lvs_on_port
command_line $USER1$/check_http -H $ARG1$ -p $ARG2$ -I $HOSTADDRESS$
-u "$ARG3"
}
- #
-# 'check_http_swift' command definition, querying a thumbnail that exists in
swift
-define command{
- command_name check_http_swift
- command_line $USER1$/check_http -H ms-fe.pmtpa.wmnet -I
$HOSTADDRESS$ -u
/wikipedia/commons/thumb/a/a2/Little_kitten_.jpg/80px-Little_kitten_.jpg
- }
-
define command{
command_name check_ssh
--
To view, visit https://gerrit.wikimedia.org/r/87633
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b38eb14b7a6861259cf3ee3c118b2730a775fde
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits