From acc8e1af34fde59696234a80475976ed6c5f5044 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 3 Jan 2021 13:32:21 +0000 Subject: [PATCH] Switch to using prometheus exporters for renderd and mod_tile --- cookbooks/prometheus/resources/collector.rb | 4 ++++ cookbooks/tile/recipes/default.rb | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cookbooks/prometheus/resources/collector.rb b/cookbooks/prometheus/resources/collector.rb index dc9c995a0..c9c28fc6e 100644 --- a/cookbooks/prometheus/resources/collector.rb +++ b/cookbooks/prometheus/resources/collector.rb @@ -64,6 +64,10 @@ action :delete do systemd_service service_name do action :delete end + + file "/var/lib/prometheus/node-exporter/#{new_resource.collector}.prom" do + action :delete + end end action_class do diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index 154ce68fd..a52c0aa66 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -611,9 +611,17 @@ munin_plugin "renderd_zoom_time" munin_plugin "replication_delay" prometheus_collector "modtile" do - interval "1m" + action :delete end prometheus_collector "renderd" do - interval "1m" + action :delete +end + +prometheus_exporter "modtile" do + port 9494 +end + +prometheus_exporter "renderd" do + port 9393 end -- 2.39.5