Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/filebeat/log_input.pp
- This file was added.
define profile::filebeat::log_input( | |||||
Array[String] $paths, | |||||
Array $fields = [], | |||||
olasd: This should be a Hash, not an Array. (It is, after all, a hash in the configuration file… | |||||
) { | |||||
olasdUnsubmitted Not Done Inline ActionsNeeds an include profile::filebeat. That way we're sure that the directory resource is defined etc. olasd: Needs an `include profile::filebeat`. That way we're sure that the directory resource is… | |||||
file { "filebeat_input_${name}" : | |||||
ensure => present, | |||||
path => "${profile::filebeat::config_directory}/inputs.d/${name}.yml", | |||||
olasdUnsubmitted Not Done Inline ActionsI'd even make the inputs.d directory an explicit variable in profile::filebeat, so the directory resource there and the path here are guaranteed to match. I'll also note that you can access the variable using this scope even if it's defined in the body of the class (no need to have it as a class argument). olasd: I'd even make the `inputs.d` directory an explicit variable in `profile::filebeat`, so the… | |||||
content => template('profile/filebeat/log_input.yml.erb'), | |||||
require => [ | |||||
File["${profile::filebeat::config_directory}/inputs.d"], | |||||
Package["filebeat"], | |||||
], | |||||
notify => Service["filebeat"], | |||||
olasdUnsubmitted Not Done Inline ActionsIs this really needed? olasd: Is this really needed? | |||||
} | |||||
} |
This should be a Hash, not an Array. (It is, after all, a hash in the configuration file itself).
The "type" of log input should be configurable.