Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405878 )

Change subject: Metrics are exposed by Blazegraph directly
......................................................................

Metrics are exposed by Blazegraph directly

While the code references Jolokia, the metrics we collect are exposed
directly by Blazegraph. Naming is now corrected and less misleading.

Bug: T182857
Change-Id: Iae70f97875f8c435f6eaf5a3c4c11479df8671bc
---
M prometheus-blazegraph-exporter
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/prometheus-blazegraph-exporter 
refs/changes/78/405878/1

diff --git a/prometheus-blazegraph-exporter b/prometheus-blazegraph-exporter
index a75ffa2..b7de957 100755
--- a/prometheus-blazegraph-exporter
+++ b/prometheus-blazegraph-exporter
@@ -76,7 +76,7 @@
 
     @scrape_duration.time()
     def collect(self):
-        jolokia_metrics = {
+        blazegraph_metrics = {
             '/Query Engine/queryStartCount': 
CounterMetricFamily('blazegraph_queries_start', 'Number of queries that have 
started since the start of the application.'),
             '/Query Engine/queryDoneCount': 
CounterMetricFamily('blazegraph_queries_done', 'Number of queries completed 
since the start of the application.'),
             '/Query Engine/queryErrorCount': 
CounterMetricFamily('blazegraph_queries_error', 'Number of queries in error 
since the start of the application.'),
@@ -98,12 +98,11 @@
             '/JVM/Memory/Garbage Collectors/G1 Young Generation/Cumulative 
Collection Time': 
GaugeMetricFamily('blazegraph_jvm_memory_gc_g1_young_cumulative_collection_time',
 'Total time spent in young GC (seconds).'),
         }
 
-        for metric_name in jolokia_metrics:
+        for metric_name, metric_family in blazegraph_metrics.iteritems():
             if metric_name is None:
                 log.warn('Unknown metric %r', metric_name)
             else:
                 metric_value = self.get_counter(metric_name)
-                metric_family = jolokia_metrics.get(metric_name)
 
                 try:
                     value = float(metric_value)
@@ -141,7 +140,7 @@
         yield triple_metric
         yield lag_metric
 
-        for metric in jolokia_metrics.values():
+        for metric in blazegraph_metrics.values():
             yield metric
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae70f97875f8c435f6eaf5a3c4c11479df8671bc
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/prometheus-blazegraph-exporter
Gerrit-Branch: master
Gerrit-Owner: Gehel <guillaume.leder...@wikimedia.org>

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

Reply via email to