-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathapache.pp
More file actions
61 lines (56 loc) · 1.21 KB
/
Copy pathapache.pp
File metadata and controls
61 lines (56 loc) · 1.21 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::apache
#
# Enable Apache Agent Plugin for Stackdriver Agent
#
# === Parameters
# ---
#
# [*config*]
# - Default - /opt/stackdriver/collectd/etc/collectd.d/apache.conf
# - Plugin configuration file
#
# [*url*]
# - Default - http://127.0.0.1/mod_status?auto
# - Target server URL
#
# [*user*]
# - Default - undef (optional)
# - Target user
#
# [*password*]
# - Default - undef (optional)
# - Target user password
#
# === Usage
# ---
#
# ==== Puppet Code
#
# Enable Apache plugin via Puppet CODE:
#
# include '::stackdriver::plugin::apache'
#
# ==== Hiera
#
# Enable Apache plugin via Hiera:
#
# stackdriver::plugins:
# - 'apache'
#
class stackdriver::plugin::apache(
$config = '/opt/stackdriver/collectd/etc/collectd.d/apache.conf',
$url = 'http://127.0.0.1/mod_status?auto',
$user = undef,
$password = undef,
) {
validate_string ( $config )
validate_string ( $url )
if $user { validate_string ( $user ) }
if $password { validate_string ( $password ) }
contain "${name}::config"
Class['::stackdriver::config'] ->
Class["::${name}::config"] ~>
Class['::stackdriver::service']
}