Madhuvishy has submitted this change and it was merged.

Change subject: tools proxy: Add health check and icinga monitoring
......................................................................


tools proxy: Add health check and icinga monitoring

Bug: T143638
Change-Id: If89260a3320315ee4cce2a70be0d7b83b21f3646
---
M modules/dynamicproxy/templates/nginx.conf
M modules/icinga/manifests/monitor/toollabs.pp
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Yuvipanda: Looks good to me, but someone else must approve
  Madhuvishy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/dynamicproxy/templates/nginx.conf 
b/modules/dynamicproxy/templates/nginx.conf
index 54acf4c..02250a8 100644
--- a/modules/dynamicproxy/templates/nginx.conf
+++ b/modules/dynamicproxy/templates/nginx.conf
@@ -1,5 +1,5 @@
 # Default nginx config for Debian Jessie with overrides for worker_connections
-# and worket_rlimit_nofile
+# and worket_rlimit_nofile. Also includes a health check endpoint.
 
 user www-data;
 worker_processes auto;
@@ -65,4 +65,10 @@
 
   include /etc/nginx/conf.d/*.conf;
   include /etc/nginx/sites-enabled/*;
+
+  server {
+    location /.well-known/healthz {
+      return 200 'proxy ok!';
+    }
+  }
 }
diff --git a/modules/icinga/manifests/monitor/toollabs.pp 
b/modules/icinga/manifests/monitor/toollabs.pp
index 4392f38..b070f96 100644
--- a/modules/icinga/manifests/monitor/toollabs.pp
+++ b/modules/icinga/manifests/monitor/toollabs.pp
@@ -35,6 +35,14 @@
         host          => 'tools.wmflabs.org',
     }
 
+    # Monitors the tools nginx proxy by hitting the health endpoint
+    # defined in dynamicproxy nginx.conf
+    monitoring::service {'tools-proxy':
+        description   => 'tools nginx proxy health',
+        check_command => 
'check_http_url!tools.wmflabs.org!/.well-known/healthz',
+        host          => 'tools.wmflabs.org',
+    }
+
     # complex checks via a wsgi app running on a cluster for this purpose.
     # these checks are used to track uptime and availability via
     # catchpoint as well as for general alerting and administration.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If89260a3320315ee4cce2a70be0d7b83b21f3646
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Madhuvishy <mviswanat...@wikimedia.org>
Gerrit-Reviewer: Madhuvishy <mviswanat...@wikimedia.org>
Gerrit-Reviewer: Yuvipanda <yuvipa...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to