-
Notifications
You must be signed in to change notification settings - Fork 261
/
Copy pathdatadog_footer.conf.erb
270 lines (220 loc) · 8.79 KB
/
datadog_footer.conf.erb
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# Collect AWS EC2 custom tags as agent tags
collect_ec2_tags: <%= @collect_ec2_tags %>
# Collect instance metadata
# The Agent will try to collect instance metadata for EC2 and GCE instances by
# trying to connect to the local endpoint: http://169.254.169.254
# See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html
# and https://developers.google.com/compute/docs/metadata
# for more information
collect_instance_metadata: <%= @collect_instance_metadata %>
# Set the threshold for accepting points to allow anything
# with recent_point_threshold seconds
# Defaults to 30 seconds if no value is provided
<% if @recent_point_threshold.empty? -%>
# recent_point_threshold: 30
<% else -%>
recent_point_threshold: <%= @recent_point_threshold %>
<% end -%>
# Change port the Agent is listening to
<% if @listen_port.to_s.empty? -%>
# listen_port: 17123
<% else -%>
listen_port: <%= @listen_port %>
<% end -%>
# Additional directory to look for Datadog checks
<% if @additional_checksd.nil? -%>
# additional_checksd: /etc/dd-agent/checks.d/
<% else -%>
additional_checksd: <%= @additional_checksd %>
<% end -%>
# Allow non-local traffic to this Agent
# This is required when using this Agent as a proxy for other Agents
# that might not have an internet connection
# For more information, please see
# https://github.com/DataDog/dd-agent/wiki/Network-Traffic-and-Proxy-Configuration
non_local_traffic: <%= @non_local_traffic %>
# The loopback address the Forwarder and Dogstatsd will bind.
# Optional, it is mainly used when running the agent on Openshift
<% if @bind_host.empty? -%>
# bind_host: localhost
<% else -%>
bind_host: <%= @bind_host %>
<% end -%>
# ========================================================================== #
# Pup configuration
# ========================================================================== #
# Pup is a small server that displays metric data collected by the Agent.
# Think of it as a fancy status page or a toe dip into the world of
# datadog. It can be connected to on the port below.
use_pup: <%= @use_pup ? "yes" : "no" %>
<% if @pup_port.to_s.empty? -%>
# pup_port: 17125
<% else -%>
pup_port: <%= @pup_port %>
<% end -%>
<% if @pup_interface.empty? -%>
# pup_interface: localhost
<% else -%>
pup_interface: <%= @pup_interface %>
<% end -%>
<% if @pup_url.empty? -%>
# pup_url: http://localhost:17125
<% else -%>
pup_url: <%= @pup_url %>
<% end -%>
# ========================================================================== #
# DogStatsd configuration #
# ========================================================================== #
# If you don't want to enable the DogStatsd server, set this option to no
use_dogstatsd: <%= @use_dogstatsd ? "yes" : "no" %>
# DogStatsd is a small server that aggregates your custom app metrics. For
# usage information, check out http://api.datadoghq.com
# Make sure your client is sending to the same port.
<% if @dogstatsd_port.to_s.empty? -%>
# dogstatsd_port: 8125
<% else -%>
dogstatsd_port: <%= @dogstatsd_port %>
<% end -%>
# By default dogstatsd will post aggregate metrics to the Agent (which handles
# errors/timeouts/retries/etc). To send directly to the datadog api, set this
# to https://app.datadoghq.com.
<% if @dogstatsd_target.empty? -%>
# dogstatsd_target: http://localhost:17123
<% else -%>
dogstatsd_target: <%= @dogstatsd_target %>
<% end -%>
## The dogstatsd flush period.
<% if @dogstatsd_interval.empty? -%>
# dogstatsd_interval: 10
<% else -%>
dogstatsd_interval: <%= @dogstatsd_interval -%>
<% end -%>
## If 'yes', counters and rates will be normalized to 1 second (that is divided
## by the dogstatsd_interval) before being sent to the server. Defaults to 'yes'
dogstatsd_normalize: <%= @dogstatsd_normalize ? "yes" : "no" %>
histogram_percentiles: <%= @statsd_histogram_percentiles %>
# If you want to forward every packet received by the dogstatsd server
# to another statsd server, uncomment these lines.
# WARNING: Make sure that forwarded packets are regular statsd packets and not "dogstatsd" packets,
# as your other statsd server might not be able to handle them.
<% if @statsd_forward_host.empty? -%>
# statsd_forward_host: address_of_own_statsd_server
<% else -%>
statsd_forward_host: <%= @statsd_forward_host %>
<% end -%>
<% if @statsd_forward_port.to_s.empty? -%>
# statsd_forward_port: 8125
<% else -%>
statsd_forward_port: <%= @statsd_forward_port %>
<% end -%>
# ========================================================================== #
# Service-specific configuration #
# ========================================================================== #
# -------------------------------------------------------------------------- #
# Disk #
# -------------------------------------------------------------------------- #
# Some infrastrucures have many constantly changing virtual devices (e.g. folks
# running constantly churning linux containers) whose metrics aren't
# interesting for datadog. To filter out a particular pattern of devices
# from collection, configure a regex here:
<% if @device_blacklist_re.empty? -%>
# device_blacklist_re: .*\/dev\/mapper\/lxc-box.*
<% else -%>
device_blacklist_re: <%= @device_blacklist_re %>
<% end -%>
# ========================================================================== #
# Logging
# ========================================================================== #
log_level: <%= @_loglevel %>
<% if @collector_log_file.empty? -%>
# collector_log_file: /var/log/datadog/collector.log
<% else -%>
collector_log_file: <%= @collector_log_file %>
<% end -%>
<% if @forwarder_log_file.empty? -%>
# forwarder_log_file: /var/log/datadog/forwarder.log
<% else -%>
forwarder_log_file: <%= @forwarder_log_file %>
<% end -%>
<% if @dogstatsd_log_file.empty? -%>
# dogstatsd_log_file: /var/log/datadog/dogstatsd.log
<% else -%>
dogstatsd_log_file: <%= @dogstatsd_log_file %>
<% end -%>
<% if @pup_log_file.empty? -%>
# pup_log_file: /var/log/datadog/pup.log
<% else -%>
pup_log_file: <%= @pup_log_file %>
<% end -%>
# if syslog is enabled but a host and port are not set, a local domain socket
# connection will be attempted
#
log_to_syslog: <%= @log_to_syslog ? "yes" : "no" %>
<% if @syslog_host.empty? -%>
# syslog_host:
<% else -%>
syslog_host: <%= @syslog_host %>
<% end -%>
<% if @syslog_port.to_s.empty? -%>
# syslog_port:
<% else -%>
syslog_port: <%= @syslog_port %>
<% end -%>
# ========================================================================== #
# Service Discovery
# ========================================================================== #
# For now only docker is supported so you just need to un-comment this line.
<% if @service_discovery_backend.empty? -%>
# service_discovery_backend: docker
<% else -%>
service_discovery_backend: <%= @service_discovery_backend %>
<% end -%>
# Define which key/value store must be used to look for configuration templates.
# Default is etcd. Consul is also supported.
<% if @sd_config_backend.empty? -%>
# sd_config_backend: etcd
<% else -%>
sd_config_backend: <%= @sd_config_backend %>
<% end -%>
# Settings for connecting to the backend. These are the default, edit them if you run a different config.
<% if @sd_backend_host.empty? -%>
# sd_backend_host: 127.0.0.1
<% else -%>
sd_backend_host: <%= @sd_backend_host %>
<% end -%>
<% if @sd_backend_port.to_i < 1 -%>
# sd_backend_port: 4001
<% else -%>
sd_backend_port: <%= @sd_backend_port %>
<% end -%>
# By default, the agent will look for the configuration templates under the
# `/datadog/check_configs` key in the back-end.
# If you wish otherwise, uncomment this option and modify its value.
<% if @sd_template_dir.empty? -%>
# sd_template_dir: /datadog/check_configs
<% else -%>
sd_template_dir: <%= @sd_template_dir %>
<% end -%>
# Enable JMX checks for service discovery
<% if @sd_jmx_enable -%>
sd_jmx_enable: <%= @sd_jmx_enable %>
<% end -%>
# If you Consul store requires token authentication for service discovery, you can define that token here.
<% if @consul_token.empty? -%>
# consul_token: f45cbd0b-5022-samp-le00-4eaa7c1f40f1
<% else -%>
consul_token: <%= @consul_token %>
<% end -%>
<% if @process_enabled -%>
process_agent_enabled: <%= @process_enabled %>
<% end -%>
# ========================================================================== #
# Trace #
# ========================================================================== #
# Enable the trace agent.
apm_enabled: <%= @apm_enabled %>
<% if not @extra_template.empty? -%>
# ========================================================================== #
# Custom Templates from Puppet #
# ========================================================================== #
<% end -%>