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
This commit is contained in:
parent
65fe0404ae
commit
2210f3c917
@ -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).')
|
||||
|
Loading…
Reference in New Issue
Block a user