prometheus: Move weblate metrics to pushgateway.

We leave the weblate metrics server and add a cron job to fetch its
contents and post them to the pushgateway.
This commit is contained in:
Alex Vandiver
2025-10-22 03:03:51 +00:00
committed by Tim Abbott
parent 25d156cc9c
commit f91bbee395
2 changed files with 7 additions and 7 deletions

View File

@@ -17,7 +17,6 @@ class kandra::prometheus::weblate {
source => 'puppet:///modules/kandra/weblate_exporter', source => 'puppet:///modules/kandra/weblate_exporter',
} }
kandra::firewall_allow { 'weblate_exporter': port => '9189' }
file { "${zulip::common::supervisor_conf_dir}/weblate_exporter.conf": file { "${zulip::common::supervisor_conf_dir}/weblate_exporter.conf":
ensure => file, ensure => file,
require => [ require => [
@@ -31,4 +30,11 @@ class kandra::prometheus::weblate {
content => template('kandra/supervisor/conf.d/weblate_exporter.conf.template.erb'), content => template('kandra/supervisor/conf.d/weblate_exporter.conf.template.erb'),
notify => Service[supervisor], notify => Service[supervisor],
} }
include kandra::prometheus::pushgateway
zulip::cron { 'weblate-to-pushgateway':
minute => '*/15',
command => 'curl http://localhost:9189/metrics | curl --data-binary @- http://localhost:9091/metrics/job/weblate',
use_proxy => false,
}
} }

View File

@@ -285,12 +285,6 @@ scrape_configs:
- target_label: __address__ - target_label: __address__
replacement: localhost:9188 replacement: localhost:9188
- job_name: "weblate"
scrape_interval: 15m
scrape_timeout: 120s
static_configs:
- targets: ["localhost:9189"]
- job_name: "vector" - job_name: "vector"
scrape_interval: 30s scrape_interval: 30s
scrape_timeout: 3s scrape_timeout: 3s