Mobrovac has uploaded a new change for review.

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

Change subject: EventBus: add spec-based monitoring
......................................................................

EventBus: add spec-based monitoring

The EventBus proxy service has got a swagger spec as well, so leverage
the automatic service health monitoring.

Change-Id: I6f821a31291912ef5ea6f6b44ba2ef105151852e
Depends-On: I9a124e8aa6fcdd7491e652705e9e54a19e85909c
---
M modules/eventlogging/manifests/service/service.pp
M modules/role/files/eventbus/topics.yaml
2 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/260799/1

diff --git a/modules/eventlogging/manifests/service/service.pp 
b/modules/eventlogging/manifests/service/service.pp
index 3fdd768..d83665e 100644
--- a/modules/eventlogging/manifests/service/service.pp
+++ b/modules/eventlogging/manifests/service/service.pp
@@ -53,6 +53,7 @@
 )
 {
     include ::rsyslog
+    include service::monitoring
     require ::eventlogging
 
     # Additional packages needed for eventlogging-service.
@@ -130,4 +131,12 @@
         nrpe_command => "/usr/lib/nagios/plugins/check_procs -c 1:1 -C python 
-a '${eventlogging_path}/bin/eventlogging-service @${config_file}'",
         require      => Base::Service_unit[$service_name],
     }
+
+    # Spec-based monitoring
+    $monitor_url = "http://${::ipaddress}:${port}";
+    nrpe::monitor_service{ "endpoints_${title}":
+        description  => "${title} endpoints health",
+        nrpe_command => "/usr/local/lib/nagios/plugins/service_checker -t 5 
${::ipaddress} ${monitor_url}",
+        subscribe    => File['/usr/local/lib/nagios/plugins/service_checker'],
+    }
 }
diff --git a/modules/role/files/eventbus/topics.yaml 
b/modules/role/files/eventbus/topics.yaml
index 734f08c..61e3039 100644
--- a/modules/role/files/eventbus/topics.yaml
+++ b/modules/role/files/eventbus/topics.yaml
@@ -19,3 +19,6 @@
 
 mediawiki.revision_visibility_set:
   schema_name: revision_visibility_set
+
+test.event:
+  schema_name: event

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

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

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

Reply via email to