Filippo Giunchedi has submitted this change and it was merged.

Change subject: prometheus: rename varnish_config to cluster_config
......................................................................


prometheus: rename varnish_config to cluster_config

I realized there's nothing varnish-specific in
prometheus::varnish_config, thus rename it to cluster_config. This way
it can be used in a similar way for memcached_exporter.

Change-Id: I33a6f601f32d9bd2eb6ce7921aac540039ff2711
---
R modules/prometheus/manifests/cluster_config.pp
M modules/prometheus/manifests/varnish_2layer.pp
R modules/prometheus/templates/cluster_config.erb
3 files changed, 11 insertions(+), 8 deletions(-)

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



diff --git a/modules/prometheus/manifests/varnish_config.pp 
b/modules/prometheus/manifests/cluster_config.pp
similarity index 67%
rename from modules/prometheus/manifests/varnish_config.pp
rename to modules/prometheus/manifests/cluster_config.pp
index abfa9e7..69251db 100644
--- a/modules/prometheus/manifests/varnish_config.pp
+++ b/modules/prometheus/manifests/cluster_config.pp
@@ -1,18 +1,21 @@
-# == Define: prometheus::varnish_config
+# == Define: prometheus::cluster_config
 #
-# Generate prometheus targets configuration for varnish clusters.
+# Generate prometheus targets configuration for WMF clusters.
 # Data is gathered using get_clusters()
 
 # == Parameters
 # $dest:    The output file where to write the result.
 # $site:    The site to use.
 # $cluster: The cluster to use.
-# $port:    The port varnish_exporter is listening on.
+# $port:    The port to use for the target.
 # $labels:  Labels to attach to the cluster's hosts.
 
 # == Example
 #
-#  prometheus::varnish_config{ 'maps_fe':
+#  Configuration for varnish_exporter for maps, running on the frontend varnish
+#  instance.
+#
+#  prometheus::cluster_config{ 'maps_fe':
 #      dest    => "${targets_path}/varnish-maps_${::site}_frontend.yaml",
 #      site    => $::site,
 #      cluster => 'cache_maps',
@@ -20,7 +23,7 @@
 #      labels  => {'layer' => 'frontend' },
 #  }
 
-define prometheus::varnish_config(
+define prometheus::cluster_config(
   $dest,
   $site,
   $cluster,
@@ -38,6 +41,6 @@
         owner   => 'root',
         group   => 'root',
         mode    => '0444',
-        content => template('prometheus/varnish_config.erb'),
+        content => template('prometheus/cluster_config.erb'),
     }
 }
diff --git a/modules/prometheus/manifests/varnish_2layer.pp 
b/modules/prometheus/manifests/varnish_2layer.pp
index 11527e3..6e917dd 100644
--- a/modules/prometheus/manifests/varnish_2layer.pp
+++ b/modules/prometheus/manifests/varnish_2layer.pp
@@ -5,7 +5,7 @@
     $targets_path,
     $cache_name,
 ) {
-    prometheus::varnish_config{ "${cache_name}_backend":
+    prometheus::cluster_config{ "${cache_name}_backend":
         dest    => 
"${targets_path}/varnish-${cache_name}_${::site}_backend.yaml",
         site    => $::site,
         cluster => "cache_${cache_name}",
@@ -15,7 +15,7 @@
         },
     }
 
-    prometheus::varnish_config{ "${cache_name}_frontend":
+    prometheus::cluster_config{ "${cache_name}_frontend":
         dest    => 
"${targets_path}/varnish-${cache_name}_${::site}_frontend.yaml",
         site    => $::site,
         cluster => "cache_${cache_name}",
diff --git a/modules/prometheus/templates/varnish_config.erb 
b/modules/prometheus/templates/cluster_config.erb
similarity index 100%
rename from modules/prometheus/templates/varnish_config.erb
rename to modules/prometheus/templates/cluster_config.erb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33a6f601f32d9bd2eb6ce7921aac540039ff2711
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Volans <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to