+ firewall_rule "accept-prometheus-#{new_resource.exporter}" do
+ action :accept
+ source "osm"
+ dest "fw"
+ proto "tcp:syn"
+ dest_ports new_resource.port
+ only_if { node[:prometheus][:mode] == "external" }
+ end
+
+ node.default[:prometheus][:addresses][new_resource.exporter] = listen_address
+
+ if new_resource.register_target
+ node.default[:prometheus][:exporters][new_resource.port] = {
+ :name => new_resource.exporter,
+ :address => listen_address,
+ :metric_relabel => new_resource.metric_relabel
+ }
+ end