Skip to content
Merged
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
8 changes: 6 additions & 2 deletions manifests/integrations/varnish.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# varnishstat
# Path to the varnishstat binary
#
# instance_name
# Used in the varnishstat command for the -n argument
#
# tags
# DataDog tags
#
Expand All @@ -19,8 +22,9 @@
# }
#
class datadog_agent::integrations::varnish (
$varnishstat = '/usr/bin/varnishstat',
$tags = [],
$varnishstat = '/usr/bin/varnishstat',
$instance_name = undef,
$tags = [],
) inherits datadog_agent::params {
include datadog_agent

Expand Down
3 changes: 3 additions & 0 deletions templates/agent-conf.d/varnish.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ init_config:

instances:
- varnishstat: <%= @varnishstat %>
<% if @instance_name -%>
name: <%= @instance_name %>
<% end -%>
<% if @tags and ! @tags.empty? -%>
tags:
<%- Array(@tags).each do |tag| -%>
Expand Down