]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/recipes/server.rb
Enable prometheus admin API
[chef.git] / cookbooks / prometheus / recipes / server.rb
index 902844c3d8826dd57976e9e78305fa797fb22fec..3014cbf9964dbd6f95bfa2657549f04cdaf15d47 100644 (file)
@@ -55,7 +55,11 @@ prometheus_exporter "cloudwatch" do
   address "127.0.0.1"
   port 5000
   listen_switch "listen-address"
-  options "--config.file=/etc/prometheus/cloudwatch.yml"
+  options %w[
+    --config.file=/etc/prometheus/cloudwatch.yml
+    --enable-feature=aws-sdk-v2
+    --enable-feature=always-return-info-metrics
+  ]
   environment "AWS_ACCESS_KEY_ID" => "AKIASQUXHPE7JHG37EA6",
               "AWS_SECRET_ACCESS_KEY" => tokens["cloudwatch"]
   subscribes :restart, "template[/etc/prometheus/cloudwatch.yml]"
@@ -237,7 +241,7 @@ package "prometheus"
 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 --storage.tsdb.retention.time=540d"
+  exec_start "/opt/prometheus-server/prometheus/prometheus --config.file=/etc/prometheus/prometheus.yml --web.enable-admin-api --web.external-url=https://prometheus.openstreetmap.org/prometheus --storage.tsdb.path=/var/lib/prometheus/metrics2 --storage.tsdb.retention.time=540d"
   timeout_stop_sec 300
   notifies :restart, "service[prometheus]"
 end