Filippo Giunchedi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/393794 )

Change subject: role: split prometheus redis jobs
......................................................................


role: split prometheus redis jobs

Bug: T148637
Change-Id: I795ce83ac9458769ef68ea5fb59507abb35d2daa
---
M modules/role/manifests/prometheus/ops.pp
1 file changed, 44 insertions(+), 14 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Filippo Giunchedi: Looks good to me, approved



diff --git a/modules/role/manifests/prometheus/ops.pp 
b/modules/role/manifests/prometheus/ops.pp
index 6361a18..f4c11fe 100644
--- a/modules/role/manifests/prometheus/ops.pp
+++ b/modules/role/manifests/prometheus/ops.pp
@@ -517,32 +517,62 @@
     }
 
 
+    # redis_exporter runs alongside each redis instance, thus drop the 
(uninteresting in this
+    # case) 'addr' and 'alias' labels
+    $redis_exporter_relabel = {
+      'regex'  => '(addr|alias)',
+      'action' => 'labeldrop',
+    }
+
+    # Configure one job per redis multidc 'category', plus redis for maps.
     $redis_jobs = [
       {
-        'job_name'        => 'redis',
+        'job_name'        => 'redis_sessions',
         'scheme'          => 'http',
         'file_sd_configs' => [
-          { 'files' => [ "${targets_path}/redis_*.yaml" ]}
+          { 'files' => [ "${targets_path}/redis_sessions_*.yaml" ]}
         ],
-        # redis_exporter runs alongside each redis instance, thus drop the 
(uninteresting in this
-        # case) 'addr' and 'alias' labels
-        'metric_relabel_configs' => [
-          { 'regex'  => '(addr|alias)',
-            'action' => 'labeldrop',
-          },
+        'metric_relabel_configs' => [ $redis_exporter_relabel ],
+      },
+      {
+        'job_name'        => 'redis_jobqueue',
+        'scheme'          => 'http',
+        'file_sd_configs' => [
+          { 'files' => [ "${targets_path}/redis_jobqueue_*.yaml" ]}
         ],
+        'metric_relabel_configs' => [ $redis_exporter_relabel ],
+      },
+      {
+        'job_name'        => 'redis_maps',
+        'scheme'          => 'http',
+        'file_sd_configs' => [
+          { 'files' => [ "${targets_path}/redis_maps_*.yaml" ]}
+        ],
+        'metric_relabel_configs' => [ $redis_exporter_relabel ],
       },
     ]
 
-    prometheus::redis_exporter_config{ "redis_master_${::site}":
-        dest       => "${targets_path}/redis_master_${::site}.yaml",
-        class_name => 'profile::redis::master',
+    prometheus::redis_exporter_config{ "redis_sessions_${::site}":
+        dest       => "${targets_path}/redis_sessions_${::site}.yaml",
+        class_name => 'role::mediawiki::memcached',
         site       => $::site,
     }
 
-    prometheus::redis_exporter_config{ "redis_slave_${::site}":
-        dest       => "${targets_path}/redis_slave_${::site}.yaml",
-        class_name => 'profile::redis::slave',
+    prometheus::redis_exporter_config{ "redis_jobqueue_master_${::site}":
+        dest       => "${targets_path}/redis_jobqueue_master_${::site}.yaml",
+        class_name => 'role::jobqueue_redis::master',
+        site       => $::site,
+    }
+
+    prometheus::redis_exporter_config{ "redis_jobqueue_slave_${::site}":
+        dest       => "${targets_path}/redis_jobqueue_slave_${::site}.yaml",
+        class_name => 'role::jobqueue_redis::slave',
+        site       => $::site,
+    }
+
+    prometheus::redis_exporter_config{ "redis_maps_${::site}":
+        dest       => "${targets_path}/redis_maps_${::site}.yaml",
+        class_name => 'role::maps::master',
         site       => $::site,
     }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I795ce83ac9458769ef68ea5fb59507abb35d2daa
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Elukey <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to