From 236e376231d2b112a7a8fd8a4b94735b70ab2f85 Mon Sep 17 00:00:00 2001 From: nyyu Date: Fri, 3 Nov 2023 09:09:05 +0100 Subject: [PATCH] fix: mariadb conf --- conf/prometheus/prometheus.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/conf/prometheus/prometheus.yml b/conf/prometheus/prometheus.yml index b30e9ea..f0adb70 100644 --- a/conf/prometheus/prometheus.yml +++ b/conf/prometheus/prometheus.yml @@ -45,7 +45,15 @@ scrape_configs: - job_name: "mariadb" static_configs: - - targets: ["192.168.0.4:9104"] + - targets: + - unix:///run/mysqld/mysqld.sock + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: 192.168.0.4:9104 - job_name: "kube" static_configs: