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

varnish: add "name" parameter #86

Merged
merged 2 commits into from
Mar 19, 2014
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
15 changes: 11 additions & 4 deletions recipes/varnish.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
include_recipe "datadog::dd-agent"

# Monitor Varnish
#
# Assuming you have 2 clusters, one tagged and one with a custom
# path to varnishstat
# you need to set up the following attributes
#
# You'll need to set up the following attributes:
# node.datadog.varnish.instances = [
#
# # Path to varnishstat (required)
# {
# :varnishstat => "/opt/local/bin/varnishstat"
# },
#
# # Tags to apply to all varnish metrics (optional)
# {
# :tags => ["test", "cache"]
# },
#
# # Varnish instance name, passed to varnishstat -n (optional)
# {
# :name => "myvarnish0"
# }
# ]

Expand Down
3 changes: 3 additions & 0 deletions templates/default/varnish.yaml.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
instances:
<% @instances.each do |i| -%>
- varnishstat: <%= i["varnishstat"] || "/usr/bin/varnishstat" %>
<% if i.key?("name") -%>
name: <%= i["name"] %>
<% end -%>
<% if i.key?("tags") -%>
tags:
<% i["tags"].each do |t| -%>
Expand Down