From 131f67059f1102a9b3e5959a45bc0d55c413c80d Mon Sep 17 00:00:00 2001 From: Cobus Bernard Date: Mon, 7 Dec 2015 08:26:40 +0200 Subject: [PATCH] This will add the sites config to the yaml file generated for iis --- recipes/iis.rb | 3 ++- templates/default/iis.yaml.erb | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/recipes/iis.rb b/recipes/iis.rb index 032ecd06..e955998d 100644 --- a/recipes/iis.rb +++ b/recipes/iis.rb @@ -8,7 +8,8 @@ # node.datadog.iis.instances = [ # { # "host" => "localhost", -# "tags" => ["prod", "other_tag"] +# "tags" => ["prod", "other_tag"], +# "sites" => ["Default Web Site"] # }, # { # "host" => "other.server.com", diff --git a/templates/default/iis.yaml.erb b/templates/default/iis.yaml.erb index cc5aada1..86cf77c6 100644 --- a/templates/default/iis.yaml.erb +++ b/templates/default/iis.yaml.erb @@ -1,6 +1,6 @@ # By default, this check will run against a single instance - the current # machine that the Agent is running on. It will check the WMI performance -# counters for IIS on that machine. +# counters for IIS on that machine. # # If you want to check other remote machines as well, you can add one # instance per host. Note: If you also want to check the counters on the @@ -23,6 +23,12 @@ instances: - <%= t %> <% end -%> <% end -%> + <% if i.key?('sites') -%> + sites: + <% i['sites'].each do |s| -%> + - <%= s %> + <% end -%> + <% end -%> <% end -%> init_config: