Faidon has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/61043


Change subject: Ceph: fix radosgw monitoring
......................................................................

Ceph: fix radosgw monitoring

This fixes backend monitoring to actually monitor RADOS, frontend to
monitor apache and also fixes server-status, needed for the Ganglia
plugin.

Change-Id: I774dc17ea6cf703bf7418e5691f3ab9298cbd2ff
---
M modules/ceph/manifests/radosgw.pp
M modules/ceph/templates/radosgw/vhost.erb
2 files changed, 17 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/61043/1

diff --git a/modules/ceph/manifests/radosgw.pp 
b/modules/ceph/manifests/radosgw.pp
index bf3f896..78e5884 100644
--- a/modules/ceph/manifests/radosgw.pp
+++ b/modules/ceph/manifests/radosgw.pp
@@ -57,4 +57,12 @@
         require => Package['apache2'],
         notify  => Service['apache2'],
     }
+
+    file { '/var/www/monitoring':
+      ensure  => directory,
+    }
+    file { '/var/www/monitoring/frontend':
+      ensure  => present,
+      content => "OK\n",
+    }
 }
diff --git a/modules/ceph/templates/radosgw/vhost.erb 
b/modules/ceph/templates/radosgw/vhost.erb
index 0944fbe..2e29db9 100644
--- a/modules/ceph/templates/radosgw/vhost.erb
+++ b/modules/ceph/templates/radosgw/vhost.erb
@@ -13,8 +13,8 @@
   DocumentRoot /var/www/
 
   RewriteEngine On
-  RewriteCond %{REQUEST_URI} !^/monitoring/
-  RewriteCond %{REQUEST_URI} !^/($|index.html|favicon.ico|robots.txt)
+  RewriteCond %{REQUEST_URI} !^/server-status
+  RewriteCond %{REQUEST_URI} !^/monitoring/frontend$
   RewriteRule ^/(.*) /dummyradosgw.fcgi?params=$1&%{QUERY_STRING} 
[E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
 
   <IfModule mod_fastcgi.c>
@@ -27,6 +27,13 @@
     </Directory>
   </IfModule>
 
+  <Location /server-status>
+    SetHandler server-status
+    Order deny,allow
+    Deny from all
+    Allow from 127.0.0.1
+  </Location>
+
   AllowEncodedSlashes On
 
   ErrorLog /var/log/apache2/error.log

-- 
To view, visit https://gerrit.wikimedia.org/r/61043
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I774dc17ea6cf703bf7418e5691f3ab9298cbd2ff
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to