X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/49a3d938c0182a09dbe33242fe52826b4de5bcce..c1fa3b8ab16ee50ccb201038cf7ea675c23113a3:/cookbooks/prometheus/recipes/server.rb?ds=sidebyside diff --git a/cookbooks/prometheus/recipes/server.rb b/cookbooks/prometheus/recipes/server.rb index 763c7fa21..36444527c 100644 --- a/cookbooks/prometheus/recipes/server.rb +++ b/cookbooks/prometheus/recipes/server.rb @@ -28,11 +28,15 @@ admins = data_bag_item("apache", "admins") prometheus_exporter "fastly" do port 8080 - listen_switch "endpoint" - listen_type "url" + listen_switch "listen" environment "FASTLY_API_TOKEN" => tokens["fastly"] end +prometheus_exporter "statuscake" do + port 9595 + environment "STATUSCAKE_APIKEY" => tokens["statuscake"] +end + cache_dir = Chef::Config[:file_cache_path] prometheus_version = "2.31.1" @@ -213,7 +217,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]) } @@ -249,7 +253,8 @@ end systemd_service "prometheus-executable" do service "prometheus" dropin "executable" - exec_start "/opt/prometheus-server/prometheus/prometheus --config.file=/etc/prometheus/prometheus.yml --web.external-url=https://prometheus.openstreetmap.org/prometheus --storage.tsdb.path=/var/lib/prometheus/metrics2" + exec_start "/opt/prometheus-server/prometheus/prometheus --config.file=/etc/prometheus/prometheus.yml --web.external-url=https://prometheus.openstreetmap.org/prometheus --storage.tsdb.path=/var/lib/prometheus/metrics2 --storage.tsdb.retention.time=30d" + timeout_stop_sec 300 notifies :restart, "service[prometheus]" end