Defined Type: collectd::typesdb

Defined in:
manifests/typesdb.pp

Summary

This define initialize a collectd typesdb file

Overview

Parameters:

  • path (String) (defaults to: $title)

    File path

  • group (String) (defaults to: $collectd::config_group)

    File

  • mode (String) (defaults to: $collectd::config_mode)

    File mode

  • owner (String) (defaults to: $collectd::config_owner)

    File owner

  • include (Boolean) (defaults to: false)

    Include the file in the typesdb config (require collectd::purge_config at true)



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/typesdb.pp', line 10

define collectd::typesdb (
  String $path     = $title,
  String $group    = $collectd::config_group,
  String $mode     = $collectd::config_mode,
  String $owner    = $collectd::config_owner,
  Boolean $include = false,
) {
  include collectd

  concat { $path:
    ensure         => present,
    owner          => $owner,
    group          => $group,
    mode           => $mode,
    ensure_newline => true,
    notify         => Service[$collectd::service_name],
  }

  if $include and $collectd::purge_config {
    concat::fragment { "include_typedb_${path}":
      order   => '50',
      target  => 'collectd_typesdb',
      content => "TypesDB \"${path}\"\n",
    }
  }
}