Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the ability for dogstreams to be defined via class declaration #77

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
# Set value of 'proxy_user' variable. Default is blank.
# $proxy_password
# Set value of 'proxy_password' variable. Default is blank.
# $dogstreams
# Comma-separated list of logs to parse and optionally custom parsers to use.
# Actions:
#
# Requires:
Expand Down Expand Up @@ -74,7 +76,8 @@
$proxy_host = '',
$proxy_port = '',
$proxy_user = '',
$proxy_password = ''
$proxy_password = '',
$dogstreams = ''
) inherits datadog_agent::params {

validate_string($dd_url)
Expand All @@ -91,6 +94,7 @@
validate_string($proxy_port)
validate_string($proxy_user)
validate_string($proxy_password)
validate_string($dogstreams)

include datadog_agent::params
case upcase($log_level) {
Expand Down
5 changes: 5 additions & 0 deletions templates/datadog.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ non_local_traffic: <%= @non_local_traffic %>
# If this value isn't specified, the default parser assumes this log format:
# metric timestamp value key0=val0 key1=val1 ...
#
<% if @dogstreams.empty? -%>
# dogstreams:
<% else -%>
dogstreams: <%= @dogstreams %>
<% end -%>

# ========================================================================== #
# Custom Emitters #
Expand Down