Filippo Giunchedi has submitted this change and it was merged.

Change subject: ganglia: add ganglia::cluster exported resource
......................................................................


ganglia: add ganglia::cluster exported resource

the sole purpose of this resource is to get exported and thus end up in
storedconfigs. From there we can pick it up via SQL and export it in other
formats, e.g. a mapping from cluster to list of hosts in that cluster.

Bug: T119520
Change-Id: I037108db9ec003b6f54dc386c19ab82093c3f166
---
A modules/ganglia/manifests/cluster.pp
M modules/ganglia/manifests/monitor.pp
2 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/modules/ganglia/manifests/cluster.pp 
b/modules/ganglia/manifests/cluster.pp
new file mode 100644
index 0000000..d5071c1
--- /dev/null
+++ b/modules/ganglia/manifests/cluster.pp
@@ -0,0 +1,7 @@
+# placeholder/shim define to be exported
+define ganglia::cluster (
+    $cluster,
+    $site,
+) {
+    debug("exporting ganglia cluster ${cluster} in site ${site} for ${title}")
+}
diff --git a/modules/ganglia/manifests/monitor.pp 
b/modules/ganglia/manifests/monitor.pp
index 94ade52..4733d90 100644
--- a/modules/ganglia/manifests/monitor.pp
+++ b/modules/ganglia/manifests/monitor.pp
@@ -16,4 +16,10 @@
         cname            => $cname,
         aggregator_hosts => $aggregator_hosts,
     }
+
+    # export ganglia::cluster resource to expose cluster -> hosts mapping
+    @@ganglia::cluster { $::fqdn:
+        cluster => $cluster,
+        site    => $site,
+    }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I037108db9ec003b6f54dc386c19ab82093c3f166
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to