aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorMartin Mágr <mmagr@redhat.com>2017-06-20 15:47:36 +0200
committerMartin Mágr <mmagr@redhat.com>2017-06-21 16:23:00 +0200
commit2210f3c9170140985b793ef3df48489c308c70d1 (patch)
tree2807e34255182b0e55f475fc948ebe16159f842c /manifests
parent65fe0404ae77364480a545141486d4d606d8119b (diff)
Make collectd to log also to file
This change will make possible to set collectd to log to file (/var/log/collectd.log by default). Change-Id: I50289ad6657852d37abbf12938128ff9ab9e3bac
Diffstat (limited to 'manifests')
-rw-r--r--manifests/profile/base/metrics/collectd.pp9
1 files changed, 9 insertions, 0 deletions
diff --git a/manifests/profile/base/metrics/collectd.pp b/manifests/profile/base/metrics/collectd.pp
index 098f795..088e6e2 100644
--- a/manifests/profile/base/metrics/collectd.pp
+++ b/manifests/profile/base/metrics/collectd.pp
@@ -23,6 +23,11 @@
# for more details.
# Defaults to hiera('step')
#
+# [*enable_file_logging*]
+# (Optional) Boolean. Whether to enable logfile plugin.
+# which we should send metrics.
+# Defaults to false
+#
# [*collectd_server*]
# (Optional) String. The name or address of a collectd server to
# which we should send metrics.
@@ -49,6 +54,7 @@
class tripleo::profile::base::metrics::collectd (
$step = Integer(hiera('step')),
+ $enable_file_logging = false,
$collectd_server = undef,
$collectd_port = undef,
$collectd_username = undef,
@@ -58,6 +64,9 @@ class tripleo::profile::base::metrics::collectd (
) {
if $step >= 3 {
include ::collectd
+ if $enable_file_logging {
+ include ::collectd::plugin::logfile
+ }
if ! ($collectd_securitylevel in [undef, 'None', 'Sign', 'Encrypt']) {
fail('collectd_securitylevel must be one of (None, Sign, Encrypt).')