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

Change subject: elasticsearch: move prometheus classes to conform with best 
practice
......................................................................


elasticsearch: move prometheus classes to conform with best practice

Change-Id: Ifd0a97eb3cd5446fcdbd87f7bc725710c1219237
---
M modules/profile/manifests/elasticsearch.pp
R modules/profile/manifests/prometheus/elasticsearch_exporter.pp
M modules/role/manifests/elasticsearch/beta.pp
M modules/role/manifests/elasticsearch/cirrus.pp
M modules/role/manifests/elasticsearch/relforge.pp
M modules/role/manifests/logstash/elasticsearch.pp
M modules/role/manifests/prometheus/ops.pp
7 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/modules/profile/manifests/elasticsearch.pp 
b/modules/profile/manifests/elasticsearch.pp
index f32c066..aa873c8 100644
--- a/modules/profile/manifests/elasticsearch.pp
+++ b/modules/profile/manifests/elasticsearch.pp
@@ -34,9 +34,6 @@
     $reindex_remote_whitelist = 
hiera('profile::elasticsearch::reindex_remote_whitelist'),
     $storage_device = hiera('profile::elasticsearch::storage_device'),
 ) {
-
-    include ::profile::elasticsearch::monitoring
-
     $master_eligible = $::fqdn in $unicast_hosts
 
     ferm::service { 'elastic-http':
diff --git a/modules/profile/manifests/elasticsearch/monitoring.pp 
b/modules/profile/manifests/prometheus/elasticsearch_exporter.pp
similarity index 86%
rename from modules/profile/manifests/elasticsearch/monitoring.pp
rename to modules/profile/manifests/prometheus/elasticsearch_exporter.pp
index e1bf3e0..9d6445f 100644
--- a/modules/profile/manifests/elasticsearch/monitoring.pp
+++ b/modules/profile/manifests/prometheus/elasticsearch_exporter.pp
@@ -1,4 +1,4 @@
-class profile::elasticsearch::monitoring(
+class profile::prometheus::elasticsearch_exporter(
     $prometheus_nodes = hiera('prometheus_nodes'),
 ) {
     $prometheus_nodes_ferm = join($prometheus_nodes, ' ')
diff --git a/modules/role/manifests/elasticsearch/beta.pp 
b/modules/role/manifests/elasticsearch/beta.pp
index cb668a1..7717ccd 100644
--- a/modules/role/manifests/elasticsearch/beta.pp
+++ b/modules/role/manifests/elasticsearch/beta.pp
@@ -5,6 +5,7 @@
 # filtertags: labs-project-deployment-prep labs-project-search 
labs-project-math
 class role::elasticsearch::beta {
     include ::profile::elasticsearch
+    include ::profile::prometheus::elasticsearch_exporter
 
     system::role { 'elasticsearch::beta':
         ensure      => 'present',
diff --git a/modules/role/manifests/elasticsearch/cirrus.pp 
b/modules/role/manifests/elasticsearch/cirrus.pp
index 699e854..f91f910 100644
--- a/modules/role/manifests/elasticsearch/cirrus.pp
+++ b/modules/role/manifests/elasticsearch/cirrus.pp
@@ -7,6 +7,7 @@
     include ::base::firewall
     include ::role::lvs::realserver
     include ::profile::elasticsearch
+    include ::profile::prometheus::elasticsearch_exporter
 
     system::role { 'elasticsearch::cirrus':
         ensure      => 'present',
diff --git a/modules/role/manifests/elasticsearch/relforge.pp 
b/modules/role/manifests/elasticsearch/relforge.pp
index d88e058..80cbccd 100644
--- a/modules/role/manifests/elasticsearch/relforge.pp
+++ b/modules/role/manifests/elasticsearch/relforge.pp
@@ -6,6 +6,7 @@
     include ::standard
     include ::base::firewall
     include ::profile::elasticsearch
+    include ::profile::prometheus::elasticsearch_exporter
     include ::elasticsearch::nagios::check
     include ::profile::mjolnir::kafka_daemon
 
diff --git a/modules/role/manifests/logstash/elasticsearch.pp 
b/modules/role/manifests/logstash/elasticsearch.pp
index 31a3255..390f21d 100644
--- a/modules/role/manifests/logstash/elasticsearch.pp
+++ b/modules/role/manifests/logstash/elasticsearch.pp
@@ -6,7 +6,7 @@
 class role::logstash::elasticsearch {
     include ::standard
     include ::elasticsearch::monitor::diamond
-    include ::profile::elasticsearch::monitoring
+    include ::profile::prometheus::elasticsearch_exporter
     include ::profile::base::firewall
 
     # the logstash cluster has 3 data nodes, and each shard has 3 replica (each
diff --git a/modules/role/manifests/prometheus/ops.pp 
b/modules/role/manifests/prometheus/ops.pp
index ab4e3e3..8680d6f 100644
--- a/modules/role/manifests/prometheus/ops.pp
+++ b/modules/role/manifests/prometheus/ops.pp
@@ -761,7 +761,7 @@
     prometheus::class_config { "elasticsearch_${::site}":
         dest       => "${targets_path}/elasticsearch_${::site}.yaml",
         site       => $::site,
-        class_name => 'profile::elasticsearch::monitoring',
+        class_name => 'profile::prometheus::elasticsearch_exporter',
         port       => '9108',
     }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd0a97eb3cd5446fcdbd87f7bc725710c1219237
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel <guillaume.leder...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Gehel <guillaume.leder...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Muehlenhoff <mmuhlenh...@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