From 6d3811383dbe9a8c36056ea2f2aa1e2b1090855e Mon Sep 17 00:00:00 2001 From: sousaedu Date: Tue, 26 Jan 2021 16:30:25 +0100 Subject: [PATCH] Fix ConfigMap for Prometheus Charm Change-Id: I340d65d50daa3dd40baf2123b7655bba9ed66fd5 Signed-off-by: sousaedu --- installers/charm/prometheus/src/pod_spec.py | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/installers/charm/prometheus/src/pod_spec.py b/installers/charm/prometheus/src/pod_spec.py index 3e4bc443..541cf3e9 100644 --- a/installers/charm/prometheus/src/pod_spec.py +++ b/installers/charm/prometheus/src/pod_spec.py @@ -238,18 +238,18 @@ def _make_pod_files(config: Dict[str, Any]) -> List[Dict[str, Any]]: { "path": "prometheus.yml", "content": ( - "global:" - " scrape_interval: 15s" - " evaluation_interval: 15s" - "alerting:" - " alertmanagers:" - " - static_configs:" - " - targets:" - "rule_files:" - "scrape_configs:" - " - job_name: 'prometheus'" - " static_configs:" - " - targets: [{}]".format(config["default_target"]) + "global:\n" + " scrape_interval: 15s\n" + " evaluation_interval: 15s\n" + "alerting:\n" + " alertmanagers:\n" + " - static_configs:\n" + " - targets:\n" + "rule_files:\n" + "scrape_configs:\n" + " - job_name: 'prometheus'\n" + " static_configs:\n" + " - targets: [{}]\n".format(config["default_target"]) ), } ], -- 2.25.1