Filippo Giunchedi has submitted this change and it was merged.

Change subject: standard: add prometheus node_exporter in codfw
......................................................................


standard: add prometheus node_exporter in codfw

Deploy node_exporter for machine-level metrics everywhere in codfw.

Bug: T140646
Change-Id: I7e8bdab41ced7185dc48d2798812284560917a10
---
M manifests/site.pp
M modules/standard/manifests/init.pp
A modules/standard/manifests/prometheus.pp
3 files changed, 15 insertions(+), 13 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index b3d90e3..e9dbe19 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1039,9 +1039,7 @@
 # These nodes are temporarilly up until we get proper
 # storage on the backup system
 node 'es2001.codfw.wmnet' {
-    # prometheus is added as a temporary measure until it is
-    # applied on all nodes by default
-    role(mariadb::otrsbackups, prometheus::node_exporter)
+    role(mariadb::otrsbackups)
     include standard
     include base::firewall
     # temporary measure until mysql is uninstalled
@@ -1049,9 +1047,6 @@
 }
 
 node /^es200[234]\.codfw\.wmnet/ {
-    # prometheus is added as a temporary measure until it is
-    # applied on all nodes by default
-    role(prometheus::node_exporter)
     include standard
     include base::firewall
     # temporary measure until mysql is uninstalled
@@ -1911,12 +1906,12 @@
 }
 
 node 'maps-test2001.codfw.wmnet' {
-    role(maps::server, maps::master, prometheus::node_exporter)
+    role(maps::server, maps::master)
     include base::firewall
 }
 
 node /^maps-test200[2-4]\.codfw\.wmnet/ {
-    role(maps::server, maps::slave, prometheus::node_exporter)
+    role(maps::server, maps::slave)
     include base::firewall
 }
 
@@ -2429,7 +2424,7 @@
 }
 
 node /^prometheus200[12]\.codfw\.wmnet$/ {
-    role(prometheus::ops, prometheus::node_exporter)
+    role(prometheus::ops)
 
     include base::firewall
     include standard
@@ -2437,7 +2432,7 @@
 }
 
 node /^prometheus100[12]\.eqiad\.wmnet$/ {
-    role(prometheus::ops, prometheus::node_exporter)
+    role(prometheus::ops)
 
     include base::firewall
     include standard
@@ -2467,7 +2462,7 @@
 
 # pybal-test200X VMs are used for pybal testing/development
 node /^pybal-test200[12]\.codfw\.wmnet$/ {
-    role(pybaltest, prometheus::node_exporter)
+    role(pybaltest)
     include standard
 }
 
@@ -2541,7 +2536,7 @@
 
 # cassandra multi-dc temporary test T111382
 node /^restbase-test200[1-3]\.codfw\.wmnet$/ {
-    role(restbase::server, cassandra, prometheus::node_exporter)
+    role(restbase::server, cassandra)
     include standard
 }
 
@@ -2870,7 +2865,7 @@
 }
 
 node 'wezen.codfw.wmnet' {
-    role(backup::host, syslog::centralserver, prometheus::node_exporter)
+    role(backup::host, syslog::centralserver)
     include standard
 }
 
diff --git a/modules/standard/manifests/init.pp 
b/modules/standard/manifests/init.pp
index cc66cdd..c03d90e 100644
--- a/modules/standard/manifests/init.pp
+++ b/modules/standard/manifests/init.pp
@@ -14,6 +14,7 @@
     }
 
     include ::standard::diamond
+    include ::standard::prometheus
 
     if $has_ganglia {
         include ::ganglia
diff --git a/modules/standard/manifests/prometheus.pp 
b/modules/standard/manifests/prometheus.pp
new file mode 100644
index 0000000..8b86cfe
--- /dev/null
+++ b/modules/standard/manifests/prometheus.pp
@@ -0,0 +1,6 @@
+# standard class for prometheus
+class standard::prometheus {
+    if $::site == 'codfw' {
+        include ::role::prometheus::node_exporter
+    }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e8bdab41ced7185dc48d2798812284560917a10
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Elukey <ltosc...@wikimedia.org>
Gerrit-Reviewer: Ema <e...@wikimedia.org>
Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Gehel <gleder...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Mark Bergsma <m...@wikimedia.org>
Gerrit-Reviewer: Volans <rcocci...@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