X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/bb670c9eb8501639d3073dfa54c2d921ca8da5ee..fa63c845987967418edaff22b75958916b19f19a:/cookbooks/prometheus/templates/default/prometheus.yml.erb diff --git a/cookbooks/prometheus/templates/default/prometheus.yml.erb b/cookbooks/prometheus/templates/default/prometheus.yml.erb index 812f32299..d5a8debaf 100644 --- a/cookbooks/prometheus/templates/default/prometheus.yml.erb +++ b/cookbooks/prometheus/templates/default/prometheus.yml.erb @@ -75,7 +75,7 @@ scrape_configs: <% end -%> - job_name: snmp scrape_interval: 5m - scrape_timeout: 1m + scrape_timeout: 2m metrics_path: /snmp static_configs: - targets: @@ -84,6 +84,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__]