From d4d4d4ac2bfe5a7880baca4a8ca65be06e38ced5 Mon Sep 17 00:00:00 2001 From: ycz008 Date: Thu, 25 Apr 2024 15:40:06 +0800 Subject: [PATCH] udpate prom add mongo --- prod-upgrade/prom/prometheus.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/prod-upgrade/prom/prometheus.yaml b/prod-upgrade/prom/prometheus.yaml index b73b289..424e9af 100644 --- a/prod-upgrade/prom/prometheus.yaml +++ b/prod-upgrade/prom/prometheus.yaml @@ -25,6 +25,22 @@ data: target_label: instance - target_label: __address__ replacement: mysql-exporter.base.svc:9104 + + - job_name: mongo + static_configs: + - targets: + # All mysql hostnames or unix sockets to monitor. + - mongodb://mongo-rs0-0.mongo-rs0.base.svc:27017 + - mongodb://mongo-rs0-1.mongo-rs0.base.svc:27017 + - mongodb://mongo-rs0-2.mongo-rs0.base.svc:27017 + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: mongo-exporter.base.svc:9216 + rule_files: - /etc/prometheus/rules/rule-0.yaml alerting: