Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

prometheus: Move weblate metrics to pushgateway.

Alex Vandiverf91bbee39560
diff --git a/puppet/kandra/manifests/prometheus/weblate.pp b/puppet/kandra/manifests/prometheus/weblate.pp
index d5613a78895..44eb11ab778 100644
--- a/puppet/kandra/manifests/prometheus/weblate.pp
+++ b/puppet/kandra/manifests/prometheus/weblate.pp
@@ -17,7 +17,6 @@ class kandra::prometheus::weblate {
source => 'puppet:///modules/kandra/weblate_exporter',
}
- kandra::firewall_allow { 'weblate_exporter': port => '9189' }
file { "${zulip::common::supervisor_conf_dir}/weblate_exporter.conf":
ensure => file,
require => [
@@ -31,4 +30,11 @@ class kandra::prometheus::weblate {
content => template('kandra/supervisor/conf.d/weblate_exporter.conf.template.erb'),
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,
+ }
}
diff --git a/puppet/kandra/templates/prometheus/prometheus.yaml.template.erb b/puppet/kandra/templates/prometheus/prometheus.yaml.template.erb
index 0bafbfb3089..93c8a21a21a 100644
--- a/puppet/kandra/templates/prometheus/prometheus.yaml.template.erb
+++ b/puppet/kandra/templates/prometheus/prometheus.yaml.template.erb
@@ -285,12 +285,6 @@ scrape_configs:
- target_label: __address__
replacement: localhost:9188
- - job_name: "weblate"
- scrape_interval: 15m
- scrape_timeout: 120s
- static_configs:
- - targets: ["localhost:9189"]
-
- job_name: "vector"
scrape_interval: 30s
scrape_timeout: 3s