blob: e9a2248c3ddb04830dd7f3d099d138acace22d7b [file] [log] [blame]
#
# MANAGED BY PUPPET
#
[Main]
# The host of the Datadog intake server to send agent data to
dd_url: <%= @dd_url %>
# If you need a proxy to connect to the Internet, provide the settings here
<% if @proxy_host.empty? -%>
# proxy_host:
<% else -%>
proxy_host: <%= @proxy_host %>
<% end -%>
<% if @proxy_port.empty? -%>
# proxy_port:
<% else -%>
proxy_port: <%= @proxy_port %>
<% end -%>
<% if @proxy_user.empty? -%>
# proxy_user:
<% else -%>
proxy_user: <%= @proxy_user %>
<% end -%>
<% if @proxy_password.empty? -%>
# proxy_password:
<% else -%>
proxy_password: <%= @proxy_password %>
<% end -%>
# If you run the agent behind haproxy, you might want to set this to yes
<% if @skip_ssl_validation -%>
skip_ssl_validation: <%= @skip_ssl_validation %>
<% else -%>
# skip_ssl_validation: no
<% end -%>
# The Datadog api key to associate your Agent's data with your organization.
# Can be found here:
# https://app.datadoghq.com/account/settings
api_key: <%= @api_key %>
# Force the hostname to whatever you want.
<% if @host.empty? -%>
# hostname:
<% else -%>
hostname: <%= @host %>
<% end -%>
# Set the host's tags
#tags: mytag0, mytag1
<%
tag_list = @local_tags
@facts_to_tags.each do |f|
value = scope.lookupvar(f)
if not value.nil?
if value.is_a?(String)
tag = "#{f}:#{value}"
tag_list << tag
end
if value.is_a?(Array)
for v in value
tag = "#{f}:#{v}"
tag_list << tag
end
end
end
end
if not tag_list.empty?
-%>
tags: <%= tag_list.join(', ') %>
<% end -%>
# 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.empty? -%>
# listen_port: 17123
<% else -%>
listen_port: <%= @listen_port %>
<% end -%>
# Start a graphite listener on this port
<% if @graphite_listen_port.empty? -%>
# graphite_listen_port: 17124
<% else -%>
graphite_listen_port: <%= @graphite_listen_port %>
<% end -%>
# Additional directory to look for Datadog checks
<% if @additional_checksd.empty? -%>
# 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 %>
# Select the Tornado HTTP Client in the forwarder
# Default to the simple http client
use_curl_http_client: <%= @use_curl_http_client %>
# 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 -%>
# Sets how often checks should be run.
<% if @check_freq.empty? -%>
# check_freq: 15
<% else -%>
check_freq: <%= @check_freq %>
<% 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.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.nil? -%>
# 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.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 -%>
# -------------------------------------------------------------------------- #
# Ganglia #
# -------------------------------------------------------------------------- #
<% if @ganglia_host.empty? -%>
# Ganglia host where gmetad is running
# ganglia_host: localhost
#
# Ganglia port where gmetad is running
# ganglia_port: 8651
<% else -%>
# Ganglia host where gmetad is running
ganglia_host: <%= @ganglia_host %>
# Ganglia port where gmetad is running
ganglia_port: <%= @ganglia_port %>
<% end -%>
# -------------------------------------------------------------------------- #
# Dogstream (log file parser)
# -------------------------------------------------------------------------- #
# Comma-separated list of logs to parse and optionally custom parsers to use.
# The form should look like this:
#
# dogstreams: /path/to/log1:parsers_module:custom_parser, /path/to/log2, /path/to/log3, ...
#
# Or this:
#
# dogstreams: /path/to/log1:/path/to/my/parsers_module.py:custom_parser, /path/to/log2, /path/to/log3, ...
#
# Each entry is a path to a log file and optionally a Python module/function pair
# separated by colons.
#
# Custom parsers should take a 2 parameters, a logger object and
# a string parameter of the current line to parse. It should return a tuple of
# the form:
# (metric (str), timestamp (unix timestamp), value (float), attributes (dict))
# where attributes should at least contain the key 'metric_type', specifying
# whether the given metric is a 'counter' or 'gauge'.
#
# Unless parsers are specified with an absolute path, the modules must exist in
# the Agent's PYTHONPATH. You can set this as an environment variable when
# starting the Agent. If the name of the custom parser function is not passed,
# 'parser' is assumed.
#
# If this value isn't specified, the default parser assumes this log format:
# metric timestamp value key0=val0 key1=val1 ...
#
<%
if not @dogstreams.empty?
-%>
dogstreams: <%= @dogstreams.join(', ') %>
<% end -%>
# ========================================================================== #
# Custom Emitters #
# ========================================================================== #
# Comma-separated list of emitters to be used in addition to the standard one
#
# Expected to be passed as a comma-separated list of colon-delimited
# name/object pairs.
#
<% if @custom_emitters.empty? -%>
# custom_emitters: /usr/local/my-code/emitters/rabbitmq.py:RabbitMQEmitter
<% else -%>
custom_emitters: <%= @custom_emitters %>
<% end -%>
#
# If the name of the emitter function is not specified, 'emitter' is assumed.
# ========================================================================== #
# 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.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 %>
<% else -%>
# sd_jmx_enable: no
<% 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 not @extra_template.empty? -%>
# ========================================================================== #
# Custom Templates from Puppet #
# ========================================================================== #
<% end -%>