]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/recipes/server.rb
Merge remote-tracking branch 'github/pull/512'
[chef.git] / cookbooks / prometheus / recipes / server.rb
index 763c7fa217cc6046a346027a7de28b44100968af..b547327c45ae2afcab3f384523678453d044accc 100644 (file)
@@ -28,8 +28,7 @@ admins = data_bag_item("apache", "admins")
 
 prometheus_exporter "fastly" do
   port 8080
 
 prometheus_exporter "fastly" do
   port 8080
-  listen_switch "endpoint"
-  listen_type "url"
+  listen_switch "listen"
   environment "FASTLY_API_TOKEN" => tokens["fastly"]
 end
 
   environment "FASTLY_API_TOKEN" => tokens["fastly"]
 end
 
@@ -249,7 +248,8 @@ end
 systemd_service "prometheus-executable" do
   service "prometheus"
   dropin "executable"
 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
 
   notifies :restart, "service[prometheus]"
 end