]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/recipes/server.rb
Configure fastly exporter for prometheus
[chef.git] / cookbooks / prometheus / recipes / server.rb
index e10e9e4ceef1eb18ecf08c61f3009dfeda0e4a85..6a1219ca0f97d6cbc0ceadc67d6f8d0c6a42589c 100644 (file)
@@ -22,6 +22,14 @@ include_recipe "apt"
 include_recipe "networking"
 
 passwords = data_bag_item("prometheus", "passwords")
+tokens = data_bag_item("prometheus", "tokens")
+
+prometheus_exporter "fastly" do
+  port 8080
+  listen_switch "endpoint"
+  listen_type "url"
+  environment "FASTLY_API_TOKEN" => tokens["fastly"]
+end
 
 package "prometheus"