]> git.openstreetmap.org Git - chef.git/blob - cookbooks/prometheus/templates/default/prometheus.yml.erb
b7a3cf81ef49a54ceed3f91828af503164c7538b
[chef.git] / cookbooks / prometheus / templates / default / prometheus.yml.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 global:
4   scrape_interval: 15s
5   evaluation_interval: 15s
6
7 alerting:
8   alertmanagers:
9     - path_prefix: /alertmanager
10       static_configs:
11         - targets:
12             - localhost:9093
13
14 rule_files:
15   - /etc/prometheus/*_rules.yml
16
17 scrape_configs:
18   - job_name: prometheus
19     scrape_interval: 5s
20     scrape_timeout: 5s
21     metrics_path: /prometheus/metrics
22     static_configs:
23       - targets:
24           - localhost:9090
25   - job_name: alertmanager
26     metrics_path: /alertmanager/metrics
27     static_configs:
28       - targets:
29           - localhost:9093
30 <% @jobs.sort.each do |name, targets| -%>
31   - job_name: <%= name %>
32     static_configs:
33 <% targets.each do |target| -%>
34       - targets:
35           - "<%= target[:address] %>"
36         labels:
37           instance: <%= target[:name].split(".").first %>
38 <% end -%>
39 <% end -%>
40
41 # remote_write:
42 #   - url: "http://localhost:9201/write"