Ema has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/371185 )

Change subject: Add metric pybal_service_depool_threshold
......................................................................


Add metric pybal_service_depool_threshold

Reports the depool_threshold from pybal.conf, useful for plotting
against pooled & total servers.

Bug: T171710
Change-Id: Ia3d712002d11cc8e9096ee49814bd53b4a9547df
---
M pybal/coordinator.py
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Ema: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pybal/coordinator.py b/pybal/coordinator.py
index 22ce835..a526b5b 100755
--- a/pybal/coordinator.py
+++ b/pybal/coordinator.py
@@ -316,6 +316,10 @@
             'could_not_depool_total',
             'Pybal could not depool a server because too many down',
             **metric_keywords),
+        'depool_threshold': Gauge(
+            'depool_threshold',
+            "Threshold of up servers vs total servers below which pybal can't 
depool any more",
+            **metric_keywords),
     }
 
     def __init__(self, lvsservice, configUrl):
@@ -333,6 +337,10 @@
         self.configObserver = config.ConfigurationObserver.fromUrl(self, 
configUrl)
         self.configObserver.startObserving()
 
+        self.metrics['depool_threshold'].labels(
+            **self.metric_labels
+            ).set(self.lvsservice.getDepoolThreshold())
+
     def __str__(self):
         return "[%s]" % self.lvsservice.name
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3d712002d11cc8e9096ee49814bd53b4a9547df
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/pybal
Gerrit-Branch: master
Gerrit-Owner: Mark Bergsma <m...@wikimedia.org>
Gerrit-Reviewer: Ema <e...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Volans <rcocci...@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