From: sousaedu Date: Thu, 13 May 2021 12:30:25 +0000 (+0200) Subject: Fixing Prometheus Backup path X-Git-Tag: release-v10.0-start~6 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=b208a17ccfeeba27532c9f17e21bcc31676b7d56;p=osm%2Fdevops.git Fixing Prometheus Backup path Change-Id: I8781f059506c31e37b5f3134e2230d21aced5719 Signed-off-by: sousaedu --- diff --git a/installers/charm/prometheus/src/charm.py b/installers/charm/prometheus/src/charm.py index e71d949f..5fdee723 100755 --- a/installers/charm/prometheus/src/charm.py +++ b/installers/charm/prometheus/src/charm.py @@ -112,13 +112,13 @@ class PrometheusCharm(CharmedOsmBase): self.prometheus.publish_info(self.app.name, PORT) def _on_backup_action(self, event: EventBase) -> NoReturn: - url = f"http://{self.model.app.name}:{PORT}/api/v2/admin/tsdb/snapshot" + url = f"http://{self.model.app.name}:{PORT}/api/v1/admin/tsdb/snapshot" result = requests.post(url) if result.status_code == 200: event.set_results({"backup-name": result.json()["name"]}) else: - event.fail(f"status-code: {result.status_code}, result: {result.json()}") + event.fail(f"status-code: {result.status_code}") def _build_files(self, config: ConfigModel): files_builder = FilesV3Builder()