Filippo Giunchedi has uploaded a new change for review.

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

Change subject: role: add external_labels to ops prometheus
......................................................................

role: add external_labels to ops prometheus

Bug: T150486
Change-Id: Ie9d3c232c07a8842ac01cdde6abc6a295baed890
---
M modules/role/manifests/prometheus/ops.pp
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/321813/1

diff --git a/modules/role/manifests/prometheus/ops.pp 
b/modules/role/manifests/prometheus/ops.pp
index 25f7cac..94287d2 100644
--- a/modules/role/manifests/prometheus/ops.pp
+++ b/modules/role/manifests/prometheus/ops.pp
@@ -6,6 +6,15 @@
     $targets_path = '/srv/prometheus/ops/targets'
     $rules_path = '/srv/prometheus/ops/rules'
 
+    $config_extra = {
+        # All metrics will get an additional 'site' label when queried by
+        # external systems (e.g. via federation)
+        'external_labels' => {
+            'site' => $::site,
+        },
+    }
+
+
     # Add one job for each of mysql 'group' (i.e. their broad function)
     # Each job will look for new files matching the glob and load the job
     # configuration automatically.
@@ -92,6 +101,7 @@
     prometheus::server { 'ops':
         listen_address       => '127.0.0.1:9900',
         scrape_configs_extra => array_concat($mysql_jobs, $varnish_jobs, 
$memcached_jobs),
+        global_config_extra  => $config_extra,
     }
 
     prometheus::web { 'ops':

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

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

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

Reply via email to