|
7 | 7 | # The host of the Datadog intake server to send agent data to.
|
8 | 8 | # Defaults to https://app.datadoghq.com.
|
9 | 9 | # $host:
|
10 |
| -# Your hostname to see in Datadog. Defaults with Datadog hostname detection. |
11 | 10 | # $api_key:
|
12 | 11 | # Your DataDog API Key. Please replace with your key value.
|
13 | 12 | # $collect_ec2_tags
|
|
34 | 33 | # $log_level
|
35 | 34 | # Set value of 'log_level' variable. Default is 'info' as in dd-agent.
|
36 | 35 | # Valid values here are: critical, debug, error, fatal, info, warn and warning.
|
| 36 | +# $hostname_extraction_regex |
| 37 | +# Completely optional. |
| 38 | +# Instead of reporting the puppet nodename, use this regex to extract the named |
| 39 | +# 'hostname' captured group to report the run in Datadog. |
| 40 | +# ex.: '^(?<hostname>.*\.datadoghq\.com)(\.i-\w{8}\..*)?$' |
37 | 41 | # $log_to_syslog
|
38 | 42 | # Set value of 'log_to_syslog' variable. Default is true -> yes as in dd-agent.
|
39 | 43 | # Valid values here are: true or false.
|
40 |
| -# $use_mount |
41 |
| -# Allow overriding default of tracking disks by device path instead of mountpoint |
42 |
| -# Valid values here are: true or false. |
43 | 44 | # $dogstatsd_port
|
44 | 45 | # Set value of the 'dogstatsd_port' variable. Defaultis 8125.
|
45 | 46 | # $statsd_forward_host
|
|
48 | 49 | # $statsd_forward_port
|
49 | 50 | # Set the value of the statsd_forward_port varable. Used to forward all
|
50 | 51 | # statsd metrics to another host.
|
| 52 | +# $manage_repo |
| 53 | +# Boolean to indicate whether this module should attempt to manage |
| 54 | +# the package repo. Default true. |
51 | 55 | # $proxy_host
|
52 | 56 | # Set value of 'proxy_host' variable. Default is blank.
|
53 | 57 | # $proxy_port
|
|
68 | 72 | # Skip SSL validation.
|
69 | 73 | # $use_curl_http_client
|
70 | 74 | # Uses the curl HTTP client for the forwarder
|
| 75 | +# $collect_ec2_tas |
| 76 | +# Presents custom EC2 tags as agent tags to datadog |
| 77 | +# Boolean. Default: False |
| 78 | +# $collect_instance_metadata |
| 79 | +# Enables the agent to try and gather instance metadata on EC2/GCE |
| 80 | +# Boolean. Default: true |
| 81 | +# $recent_point_threshold |
| 82 | +# Sets the threshold for accepting points. |
| 83 | +# String. Default: empty (30 second intervals) |
| 84 | +# $listen_port |
| 85 | +# Change the port that the agent listens on |
| 86 | +# String. Default: empty (port 17123 in dd-agent) |
| 87 | +# $additional_checksd |
| 88 | +# Additional directory to look for datadog checks in |
| 89 | +# String. Default: empty |
| 90 | +# $bind_host |
| 91 | +# The loopback address the forwarder and Dogstatsd will bind. |
| 92 | +# String. Default: empty |
| 93 | +# $use_pup |
| 94 | +# Enables the local pup dashboard |
| 95 | +# Boolean. Default: false |
| 96 | +# $pup_port |
| 97 | +# Specifies the port to be used by pup. Must have use_pup set |
| 98 | +# String. Default: empty |
| 99 | +# $pup_interface |
| 100 | +# Specifies which interface pup will use. Must have use_pup set |
| 101 | +# String. Default: empty |
| 102 | +# $pup_url |
| 103 | +# Specifies the URL used to access pup. Must have use_pup set |
| 104 | +# String. Default: empty |
| 105 | +# $use_dogstatsd |
| 106 | +# Enables the dogstatsd server |
| 107 | +# Boolean. Default: false |
| 108 | +# $dogstatsd_port |
| 109 | +# Specifies the port to be used by dogstatsd. Must have use_dogstatsd set |
| 110 | +# String. Default: empty |
| 111 | +# $dogstatsd_target |
| 112 | +# Change the target to be used by dogstatsd. Must have use_dogstatsd set |
| 113 | +# set |
| 114 | +# String. Default: empty |
| 115 | +# $dogstatsd_interval |
| 116 | +# Change the dogstatsd flush period. Must have use_dogstatsd set |
| 117 | +# String. Default: empty ( 10 second interval) |
| 118 | +# $dogstatsd_normalize |
| 119 | +# Enables 1 second nomralization. Must have use_dogstatsd set |
| 120 | +# Boolean. Default: true |
| 121 | +# $statsd_forward_host |
| 122 | +# Enables forwarding of statsd packetsto host. Must have use_dogstatsd set |
| 123 | +# String. Default: empty |
| 124 | +# $statsd_forward_port |
| 125 | +# Specifis port for $statsd_forward_host. Must have use_dogstatsd set |
| 126 | +# String. Default: empty |
| 127 | +# $device_blacklist_re |
| 128 | +# Specifies pattern for device blacklisting. |
| 129 | +# String. Default: empty |
| 130 | +# $ganglia_host |
| 131 | +# Specifies host where gmetad is running |
| 132 | +# String. Default: empty |
| 133 | +# $ganglia_port |
| 134 | +# Specifies port for $ganglia_host |
| 135 | +# String. Default: empty |
| 136 | +# $dogstreams |
| 137 | +# Specifies port for list of logstreams/modules to be used. |
| 138 | +# String. Default: empty |
| 139 | +# $custom_emitters |
| 140 | +# Specifies a comma seperated list of non standard emitters to be used |
| 141 | +# String. Default: empty |
| 142 | +# $custom_emitters |
| 143 | +# Specifies a comma seperated list of non standard emitters to be used |
| 144 | +# String. Default: empty |
| 145 | +# $collector_log_file |
| 146 | +# Specifies the log file location for the collector system |
| 147 | +# String. Default: empty |
| 148 | +# $forwarder_log_file |
| 149 | +# Specifies the log file location for the forwarder system |
| 150 | +# String. Default: empty |
| 151 | +# $dogstatsd |
| 152 | +# Specifies the log file location for the dogstatsd system |
| 153 | +# String. Default: empty |
| 154 | +# $pup_log_file |
| 155 | +# Specifies the log file location for the pup system |
| 156 | +# String. Default: empty |
| 157 | +# |
| 158 | +# |
71 | 159 | # Actions:
|
72 | 160 | #
|
73 | 161 | # Requires:
|
|
103 | 191 | $log_to_syslog = true,
|
104 | 192 | $service_ensure = 'running',
|
105 | 193 | $service_enable = true,
|
106 |
| - $use_mount = false, |
| 194 | + $manage_repo = true, |
| 195 | + $hostname_extraction_regex = nil, |
107 | 196 | $dogstatsd_port = 8125,
|
108 | 197 | $statsd_forward_host = '',
|
109 |
| - $statsd_forward_port = 8125, |
| 198 | + $statsd_forward_port = '', |
110 | 199 | $statsd_histogram_percentiles = '0.95',
|
111 | 200 | $proxy_host = '',
|
112 | 201 | $proxy_port = '',
|
|
118 | 207 | $ganglia_port = 8651,
|
119 | 208 | $skip_ssl_validation = false,
|
120 | 209 | $skip_apt_key_trusting = false,
|
121 |
| - $use_curl_http_client = false |
| 210 | + $use_curl_http_client = false, |
| 211 | + $recent_point_threshold = '', |
| 212 | + $listen_port = '', |
| 213 | + $additional_checksd = '', |
| 214 | + $bind_host = '', |
| 215 | + $use_pup = false, |
| 216 | + $pup_port = '', |
| 217 | + $pup_interface = '', |
| 218 | + $pup_url = '', |
| 219 | + $use_dogstatsd = false, |
| 220 | + $dogstatsd_target = '', |
| 221 | + $dogstatsd_interval = '', |
| 222 | + $dogstatsd_normalize = true, |
| 223 | + $device_blacklist_re = '', |
| 224 | + $custom_emitters = '', |
| 225 | + $collector_log_file = '', |
| 226 | + $forwarder_log_file = '', |
| 227 | + $dogstatsd_log_file = '', |
| 228 | + $pup_log_file = '', |
| 229 | + $syslog_host = '', |
| 230 | + $syslog_port = '', |
122 | 231 | ) inherits datadog_agent::params {
|
123 | 232 |
|
124 | 233 | validate_string($dd_url)
|
|
132 | 241 | validate_string($puppetmaster_user)
|
133 | 242 | validate_bool($non_local_traffic)
|
134 | 243 | validate_bool($log_to_syslog)
|
| 244 | + validate_bool($manage_repo) |
135 | 245 | validate_string($log_level)
|
136 | 246 | validate_integer($dogstatsd_port)
|
137 | 247 | validate_string($statsd_histogram_percentiles)
|
| 248 | + validate_string($statsd_forward_port) |
138 | 249 | validate_string($proxy_host)
|
139 | 250 | validate_string($proxy_port)
|
140 | 251 | validate_string($proxy_user)
|
|
146 | 257 | validate_bool($skip_ssl_validation)
|
147 | 258 | validate_bool($skip_apt_key_trusting)
|
148 | 259 | validate_bool($use_curl_http_client)
|
| 260 | + validate_bool($collect_ec2_tags) |
| 261 | + validate_bool($collect_instance_metadata) |
| 262 | + validate_string($recent_point_threshold) |
| 263 | + validate_string($listen_port) |
| 264 | + validate_string($additional_checksd) |
| 265 | + validate_string($bind_host) |
| 266 | + validate_bool($use_pup) |
| 267 | + validate_string($pup_port) |
| 268 | + validate_string($pup_interface) |
| 269 | + validate_string($pup_url) |
| 270 | + validate_bool($use_dogstatsd) |
| 271 | + validate_string($dogstatsd_target) |
| 272 | + validate_string($dogstatsd_interval) |
| 273 | + validate_bool($dogstatsd_normalize) |
| 274 | + validate_string($statsd_forward_host) |
| 275 | + validate_string($device_blacklist_re) |
| 276 | + validate_string($custom_emitters) |
| 277 | + validate_string($collector_log_file) |
| 278 | + validate_string($forwarder_log_file) |
| 279 | + validate_string($dogstatsd_log_file) |
| 280 | + validate_string($pup_log_file) |
| 281 | + validate_string($syslog_host) |
| 282 | + validate_string($syslog_port) |
149 | 283 |
|
150 | 284 | if $hiera_tags {
|
151 | 285 | $local_tags = hiera_array('datadog_agent::tags')
|
|
167 | 301 |
|
168 | 302 | case $::operatingsystem {
|
169 | 303 | 'Ubuntu','Debian' : { include datadog_agent::ubuntu }
|
170 |
| - 'RedHat','CentOS','Fedora','Amazon','Scientific' : { include datadog_agent::redhat } |
| 304 | + 'RedHat','CentOS','Fedora','Amazon','Scientific' : { |
| 305 | + class { 'datadog_agent::redhat': |
| 306 | + manage_repo => $manage_repo, |
| 307 | + } |
| 308 | + } |
171 | 309 | default: { fail("Class[datadog_agent]: Unsupported operatingsystem: ${::operatingsystem}") }
|
172 | 310 | }
|
173 | 311 |
|
|
201 | 339 |
|
202 | 340 | if $puppet_run_reports {
|
203 | 341 | class { 'datadog_agent::reports':
|
204 |
| - api_key => $api_key, |
205 |
| - puppetmaster_user => $puppetmaster_user, |
| 342 | + api_key => $api_key, |
| 343 | + puppetmaster_user => $puppetmaster_user, |
| 344 | + hostname_extraction_regex => $hostname_extraction_regex, |
206 | 345 | }
|
207 | 346 | }
|
208 |
| - |
209 | 347 | }
|
0 commit comments