name = exporter[:name]
address = exporter[:address]
sni = exporter[:sni]
+ labels = Array(exporter[:labels])
scrape_interval = exporter[:scrape_interval]
scrape_timeout = exporter[:scrape_timeout]
metric_relabel = exporter[:metric_relabel] || []
name = key
address = exporter
sni = nil
+ labels = []
scrape_interval = nil
scrape_timeout = nil
metric_relabel = []
:address => address,
:sni => sni,
:instance => client.name.split(".").first,
+ :labels => labels,
:scrape_interval => scrape_interval,
:scrape_timeout => scrape_timeout,
:metric_relabel => metric_relabel
- "<%= target[:address] %>"
labels:
instance: <%= target[:instance] %>
-<% Hash(target[:labels]).sort.each do |name, value| -%>
+<% target[:labels].sort.each do |name, value| -%>
<%= name %>: <%= value %>
<% end -%>
<% end -%>