-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathpostgres.pp
More file actions
61 lines (56 loc) · 1.19 KB
/
Copy pathpostgres.pp
File metadata and controls
61 lines (56 loc) · 1.19 KB
1
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 foldmethod=marker
#
# == Class: stackdriver::plugin::postgres
#
# Enable Postgres Agent Plugin for Stackdriver Agent
#
# === Parameters
# ---
#
# [*config*]
# - Default - /opt/stackdriver/collectd/etc/collectd.d/postgres.conf
# - Plugin Configuration File
#
# [*dbname*]
# - Default - NONE (REQUIRED)
# - Target database name
#
# [*user*]
# - Default - stackdriver
# - Target user
#
# [*password*]
# - Default - xoiboov9Pai5e
# - Target user password
#
# === Usage
# ---
#
# ==== Puppet Code
#
# Enable Postgres plugin via Puppet CODE:
#
# include '::stackdriver::plugin::postgres'
#
# ==== Hiera
#
# Enable Postgres plugin via Hiera:
#
# stackdriver::plugins:
# - 'postgres'
#
class stackdriver::plugin::postgres(
$config = '/opt/stackdriver/collectd/etc/collectd.d/postgres.conf',
$dbname = undef, # REQUIRED Param
$user = 'stackdriver',
$password = 'xoiboov9Pai5e',
) {
validate_string ( $config )
validate_string ( $dbname )
validate_string ( $user )
validate_string ( $password )
contain "${name}::config"
Class['::stackdriver::config'] ->
Class["::${name}::config"] ~>
Class['::stackdriver::service']
}