udpate prom add mongo

main
ycz008 2024-04-25 15:40:06 +08:00
parent 08bfc5d6a9
commit d4d4d4ac2b
1 changed files with 16 additions and 0 deletions

View File

@ -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: