1 # DO NOT EDIT - This file is being maintained by Chef
5 evaluation_interval: 15s
9 - path_prefix: /alertmanager
15 - /etc/prometheus/*_rules.yml
18 - job_name: prometheus
21 metrics_path: /prometheus/metrics
25 - job_name: alertmanager
26 metrics_path: /alertmanager/metrics
38 <% @certificates.values.sort_by { |c| c[:domains].first }.each do |certificate| -%>
40 <% certificate[:nodes].sort_by { |h| h[:name] }.each do |host| -%>
41 - <%= certificate[:domains].first %>/<%= host[:name] %>:443
44 domain: <%= certificate[:domains].first %>
47 - source_labels: [__address__]
49 target_label: __param_module
50 - source_labels: [__address__]
52 target_label: __param_target
53 - source_labels: [__param_target]
55 target_label: instance
56 - target_label: __address__
57 replacement: 127.0.0.1:9219
58 <% @jobs.sort.each do |name, targets| -%>
59 - job_name: <%= name %>
60 <% if targets.first[:scrape_interval] -%>
61 scrape_interval: <%= targets.first[:scrape_interval] %>
63 <% if targets.first[:scrape_timeout] -%>
64 scrape_timeout: <%= targets.first[:scrape_timeout] %>
66 <% if targets.first[:sni] -%>
68 server_name: <%= targets.first[:sni] %>
70 - target_label: __scheme__
74 <% targets.each do |target| -%>
76 - "<%= target[:address] %>"
78 instance: <%= target[:instance] %>
80 metric_relabel_configs:
81 <% targets.each do |target| -%>
82 <% target[:metric_relabel].each do |relabel| -%>
83 - source_labels: [instance,<%= relabel[:source_labels] %>]
84 regex: "<%= target[:instance] %>;<%= relabel[:regex] %>"
85 action: <%= relabel[:action] %>
94 <% @snmp_targets.sort_by { |t| t[:instance] }.each do |target| -%>
96 <% target[:modules].each do |module_name| -%>
97 - "<%= target[:target] %>/<%= module_name %>/<%= target[:address] %>"
100 instance: <%= target[:instance] %>
101 <% target[:labels].sort.each do |name, value| -%>
102 <%= name %>: <%= value %>
106 - source_labels: [__address__]
107 regex: "([^/]+)/[^/]+/.*"
108 target_label: __param_target
109 - source_labels: [__address__]
110 regex: "[^/]+/([^/]+)/.*"
111 target_label: __param_module
112 - source_labels: [__address__]
113 regex: "[^/]+/[^/]+/(.*)"
114 target_label: __address__
117 - url: "http://localhost:9201/write"
118 write_relabel_configs:
119 - source_labels: [__name__]
122 - source_labels: [__name__]
128 batch_send_deadline: 30s