Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Support relations array for postgres check
Browse files Browse the repository at this point in the history
As of dd-agent 4.1.0, we can now track per-relation (table) metrics.
This adds the ability to control the rendered template from node
attributes.

Fixes DataDog#97
  • Loading branch information
miketheman authored and Niko Kurtti committed Oct 20, 2014
1 parent 7fc4086 commit a3cd8f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes/postgres.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# 'host' => "remote",
# 'port' => "5432",
# 'username' => "datadog",
# 'tags' => ["prod"]
# 'tags' => ["prod"],
# 'relations' => ["apple_table", "orange_table"]
# }
# ]

Expand Down
6 changes: 6 additions & 0 deletions templates/default/postgres.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ instances:
- <%= t %>
<% end -%>
<% end -%>
<% if i.key?("relations") -%>
relations:
<% i["relations"].each do |r| -%>
- <%= r %>
<% end -%>
<% end -%>
<% end -%>

0 comments on commit a3cd8f4

Please sign in to comment.