]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/templates/default/prometheus.yml.erb
Adjust sandbox for otrs service
[chef.git] / cookbooks / prometheus / templates / default / prometheus.yml.erb
index 812f3229913fb16fae1686a9f9469d9ec00610b9..9b24a4d459e5b1b69b51ea9cb0d16747749f9067 100644 (file)
@@ -57,6 +57,13 @@ scrape_configs:
         replacement: 127.0.0.1:9219
 <% @jobs.sort.each do |name, targets| -%>
   - job_name: <%= name %>
+<% if targets.first[:sni] -%>
+    tls_config:
+      server_name: <%= targets.first[:sni] %>
+    relabel_configs:
+      - target_label: __scheme__
+        replacement: https
+<% end -%>
     static_configs:
 <% targets.each do |target| -%>
       - targets:
@@ -75,7 +82,7 @@ scrape_configs:
 <% end -%>
   - job_name: snmp
     scrape_interval: 5m
-    scrape_timeout: 1m
+    scrape_timeout: 2m
     metrics_path: /snmp
     static_configs:
       - targets:
@@ -84,6 +91,9 @@ scrape_configs:
           - "<%= target[:target] %>/<%= target[:module] %>/<%= target[:address] %>"
         labels:
           instance: <%= target[:instance] %>
+<% target[:labels].sort.each do |name, value| -%>
+          <%= name %>: <%= value %>
+<% end -%>
 <% end -%>
     relabel_configs:
       - source_labels: [__address__]