Defined Type: collectd::plugin::tail::file

Defined in:
manifests/plugin/tail/file.pp

Overview

Parameters:

  • filename (Any)
  • instance (Any)
  • matches (Any)
  • ensure (Any) (defaults to: 'present')


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'manifests/plugin/tail/file.pp', line 2

define collectd::plugin::tail::file (
  $filename,
  $instance,
  $matches,
  $ensure = 'present',
) {

  include ::collectd
  include ::collectd::plugin::tail

  $conf_dir = $collectd::plugin_conf_dir

  validate_absolute_path($filename)
  validate_string($instance)
  validate_array($matches)
  validate_hash($matches[0])

  file { "${name}.conf":
    ensure  => $ensure,
    path    => "${conf_dir}/tail-${name}.conf",
    mode    => '0644',
    owner   => 'root',
    group   => $collectd::root_group,
    content => template('collectd/tail-file.conf.erb'),
    notify  => Service['collectd'],
  }
}