diff options
author | Lars Kellogg-Stedman <lars@redhat.com> | 2016-12-14 22:07:26 -0500 |
---|---|---|
committer | Lars Kellogg-Stedman <lars@redhat.com> | 2017-01-18 10:06:15 -0500 |
commit | e56f9e304fa12eef915da4d8e2c0218ca1155ca3 (patch) | |
tree | 98c6fa7a8e236a980403cdbafcfa26b49f036ee7 /manifests/profile/base/metrics/collectd | |
parent | 77cd102c9a96c1be4bef7f8afb95f300c06d2134 (diff) |
updates to collectd support
Based on Steve Hardy's comments in
https://review.openstack.org/#/c/413748/, we need to move handling of
the list of plugins out of the heat templates and into puppet. This
module now uses the service_names variable to look up information on
per-service collectd plugins.
Change-Id: Ie5fba01e1f91ffdc39eb0eb1be9b1464c797b04f
Diffstat (limited to 'manifests/profile/base/metrics/collectd')
-rw-r--r-- | manifests/profile/base/metrics/collectd/collectd_plugin.pp | 6 | ||||
-rw-r--r-- | manifests/profile/base/metrics/collectd/collectd_service.pp | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/manifests/profile/base/metrics/collectd/collectd_plugin.pp b/manifests/profile/base/metrics/collectd/collectd_plugin.pp new file mode 100644 index 0000000..5ab940b --- /dev/null +++ b/manifests/profile/base/metrics/collectd/collectd_plugin.pp @@ -0,0 +1,6 @@ +# We use this to transform a list of unqualified plugin names +# (like ['disk', 'ntpd']) into the correct collectd plugin classes. +define tripleo::profile::base::metrics::collectd::collectd_plugin ( +) { + include "collectd::plugin::${title}" +} diff --git a/manifests/profile/base/metrics/collectd/collectd_service.pp b/manifests/profile/base/metrics/collectd/collectd_service.pp new file mode 100644 index 0000000..c1b3a60 --- /dev/null +++ b/manifests/profile/base/metrics/collectd/collectd_service.pp @@ -0,0 +1,11 @@ +# This is used to look up a list of service-specific collectd plugins +# in the hiera data provided by THT. +define tripleo::profile::base::metrics::collectd::collectd_service ( +) { + $plugins = hiera("tripleo.collectd.plugins.${title}", []) + + if $plugins { + ::tripleo::profile::base::metrics::collectd::collectd_plugin { + $plugins: } + } +} |