X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/8cdbdc0855c67a85aeafbfa1b6d6a6bc3a5ed497..dfaeb28d4cbfdf3a1b11ebd9a1d7bcbbf697f5cc:/cookbooks/prometheus/recipes/server.rb diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index fe359b450..ac2d44efc 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -32,6 +32,12 @@ prometheus_exporter "fastly" do environment "FASTLY_API_TOKEN" => tokens["fastly"] end +prometheus_exporter "fastly_healthcheck" do + port 9696 + scrape_interval "1m" + environment "FASTLY_API_TOKEN" => tokens["fastly"] +end + prometheus_exporter "statuscake" do port 9595 environment "STATUSCAKE_APIKEY" => tokens["statuscake"] @@ -41,7 +47,7 @@ cache_dir = Chef::Config[:file_cache_path] prometheus_version = "2.31.1" alertmanager_version = "0.23.0" -karma_version = "0.93" +karma_version = "0.105" directory "/opt/prometheus-server" do owner "root" @@ -196,11 +202,13 @@ search(:node, "recipes:prometheus\\:\\:default").sort_by(&:name).each do |client name = exporter[:name] address = exporter[:address] sni = exporter[:sni] + scrape_interval = exporter[:scrape_interval] metric_relabel = exporter[:metric_relabel] || [] else name = key address = exporter sni = nil + scrape_interval = nil metric_relabel = [] end @@ -209,6 +217,7 @@ search(:node, "recipes:prometheus\\:\\:default").sort_by(&:name).each do |client :address => address, :sni => sni, :instance => client.name.split(".").first, + :scrape_interval => scrape_interval, :metric_relabel => metric_relabel } end @@ -217,7 +226,7 @@ search(:node, "recipes:prometheus\\:\\:default").sort_by(&:name).each do |client snmp_targets << { :instance => instance, :target => details[:address], - :module => details[:module], + :modules => details[:modules], :address => client[:prometheus][:addresses]["snmp"], :labels => Array(details[:labels]) }