+ jobs[name] << {
+ :address => address,
+ :sni => sni,
+ :instance => client.name.split(".").first,
+ :labels => labels,
+ :scrape_interval => scrape_interval,
+ :scrape_timeout => scrape_timeout,
+ :metric_relabel => metric_relabel
+ }
+ end
+
+ Hash(client[:prometheus][:junos]).each do |instance, details|
+ junos_targets << {
+ :instance => instance,
+ :target => details[:address],
+ :address => client[:prometheus][:addresses]["junos"],
+ :labels => Array(details[:labels])
+ }
+ end
+
+ Hash(client[:prometheus][:snmp]).each do |instance, details|
+ snmp_targets << {
+ :instance => instance,
+ :target => details[:address],
+ :modules => details[:modules],
+ :address => client[:prometheus][:addresses]["snmp"],
+ :labels => Array(details[:labels])
+ }
+ end
+end
+
+certificates = search(:node, "letsencrypt:certificates").each_with_object({}) do |n, c|
+ n[:letsencrypt][:certificates].each do |name, details|
+ c[name] ||= details.merge(:nodes => [])
+
+ c[name][:nodes] << {
+ :name => n[:fqdn],
+ :address => n.external_ipaddress || n.internal_ipaddress
+ }