From c001c4b7a747d12c307e5ee5576aad88f99e58c5 Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Tue, 17 Oct 2023 11:32:00 +0200 Subject: [PATCH 1/2] Add params to allowed scrape jobs keys Params allows to specify HTTP query parameters to append to a metrics_path. --- lib/charms/prometheus_k8s/v0/prometheus_scrape.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/charms/prometheus_k8s/v0/prometheus_scrape.py b/lib/charms/prometheus_k8s/v0/prometheus_scrape.py index e4297aa1..66f2778f 100644 --- a/lib/charms/prometheus_k8s/v0/prometheus_scrape.py +++ b/lib/charms/prometheus_k8s/v0/prometheus_scrape.py @@ -362,7 +362,7 @@ def _on_scrape_targets_changed(self, event): # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 42 +LIBPATCH = 43 PYDEPS = ["cosl"] @@ -386,6 +386,7 @@ def _on_scrape_targets_changed(self, event): "basic_auth", "tls_config", "authorization", + "params", } DEFAULT_JOB = { "metrics_path": "/metrics", From 92d4c4c09ae4f06027ce2f9756bbeb93d643b8fb Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Mon, 23 Oct 2023 09:28:22 +0200 Subject: [PATCH 2/2] Bump prometheus_scrape lib version --- lib/charms/prometheus_k8s/v0/prometheus_scrape.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/charms/prometheus_k8s/v0/prometheus_scrape.py b/lib/charms/prometheus_k8s/v0/prometheus_scrape.py index 68563a85..c954bc06 100644 --- a/lib/charms/prometheus_k8s/v0/prometheus_scrape.py +++ b/lib/charms/prometheus_k8s/v0/prometheus_scrape.py @@ -362,7 +362,7 @@ def _on_scrape_targets_changed(self, event): # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 43 +LIBPATCH = 44 PYDEPS = ["cosl"]