Remove upstream prometheus cookbook, migrate to our own

This commit is contained in:
2026-07-04 15:27:18 +02:00
parent fa5bc1610d
commit 4c770cc51f
37 changed files with 230 additions and 1480 deletions
@@ -0,0 +1,31 @@
global:
<% @global_config.each do |k, v| %>
<%= k %>: "<%= v %>"
<% end %>
scrape_configs:
<% @jobs.each do |name, job| %>
- job_name: "<%= name %>"
<% if job['scrape_interval'] %>
scrape_interval: "<%= job['scrape_interval'] %>"
<% end %>
<% if job['scrape_timeout'] %>
scrape_timeout: "<%= job['scrape_timeout'] %>"
<% end %>
metrics_path: "<%= job.fetch('metrics_path', '/metrics') %>"
static_configs:
- targets: <%= Array(job['targets']) %>
<% if job['labels'] %>
labels:
<% job['labels'].each do |label, label_config| %>
<%= label %>: <%= label_config %>
<% end %>
<% end %>
<% end %>
<% if @rule_files && !@rule_files.empty? %>
rule_files:
<% @rule_files.each do |filename| %>
- <%= filename %>
<% end %>
<% end %>