Defined Type: collectd::plugin::dbi::database

Defined in:
manifests/plugin/dbi/database.pp

Overview

database allows you to create <Database> blocks with the same name of database,

Parameters:

  • driver (String)
  • ensure (String) (defaults to: 'present')
  • host (Optional[String]) (defaults to: undef)
  • databasename (String) (defaults to: $name)
  • driveroption (Hash) (defaults to: {})
  • selectdb (Optional[String]) (defaults to: undef)
  • query (Array) (defaults to: [])
  • db_query_interval (Optional[Integer[1]]) (defaults to: undef)


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'manifests/plugin/dbi/database.pp', line 3

define collectd::plugin::dbi::database (
  String $driver,
  String $ensure                          = 'present',
  Optional[String] $host                  = undef,
  String $databasename                    = $name,
  Hash $driveroption                      = {},
  Optional[String] $selectdb              = undef,
  Array $query                            = [],
  Optional[Integer[1]] $db_query_interval = undef,
) {
  include collectd
  include collectd::plugin::dbi

  concat::fragment { "collectd_plugin_dbi_conf_db_${title}":
    order   => '50',
    target  => "${collectd::plugin_conf_dir}/dbi-config.conf",
    content => template('collectd/plugin/dbi/database.conf.erb'),
  }
}