From 63a8f3fb946c850ccaa05d3811fac420fcf3c8fe Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 7 Apr 2024 22:35:34 +0900 Subject: [PATCH] Specify `consul` dynamic hostname, instead of static IP addresses. --- .../files/etc/grafana/provisioning/datasources/loki.yaml | 2 +- .../files/etc/grafana/provisioning/datasources/prometheus.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/grafana/files/etc/grafana/provisioning/datasources/loki.yaml b/cookbooks/grafana/files/etc/grafana/provisioning/datasources/loki.yaml index c0666fa..92dabe1 100644 --- a/cookbooks/grafana/files/etc/grafana/provisioning/datasources/loki.yaml +++ b/cookbooks/grafana/files/etc/grafana/provisioning/datasources/loki.yaml @@ -18,7 +18,7 @@ datasources: # org id. will default to orgId 1 if not specified orgId: 1 # url - url: http://localhost:3100 + url: http://loki.service.consul:3100 version: 1 # allow users to edit datasources from the UI. editable: false diff --git a/cookbooks/grafana/files/etc/grafana/provisioning/datasources/prometheus.yaml b/cookbooks/grafana/files/etc/grafana/provisioning/datasources/prometheus.yaml index 852acec..ddd99e0 100644 --- a/cookbooks/grafana/files/etc/grafana/provisioning/datasources/prometheus.yaml +++ b/cookbooks/grafana/files/etc/grafana/provisioning/datasources/prometheus.yaml @@ -18,7 +18,7 @@ datasources: # org id. will default to orgId 1 if not specified orgId: 1 # url - url: http://localhost:9090 + url: http://prometheus.service.consul:9090 version: 1 # allow users to edit datasources from the UI. editable: false