From f7f776eaad7884938f3647a9b937a9ec4cdc6d2a Mon Sep 17 00:00:00 2001 From: JadKHaddad Date: Sun, 20 Aug 2023 13:41:16 +0200 Subject: [PATCH 1/2] Subject: Communication Issue Between Viz and External Prometheus Problem: In the documentation explaining the usage of an external Prometheus, the protocol is missing in provided example. This is causing Viz to be unable to establish communication with the external Prometheus, resulting in a "unsupported protocol" error message in the logs. Solution: added protocol and basic auth to prometheus url Fixes #1658 Signed-off-by: JadKHaddad --- linkerd.io/content/2.13/tasks/external-prometheus.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linkerd.io/content/2.13/tasks/external-prometheus.md b/linkerd.io/content/2.13/tasks/external-prometheus.md index 0703bc166b..f064dc3e1f 100644 --- a/linkerd.io/content/2.13/tasks/external-prometheus.md +++ b/linkerd.io/content/2.13/tasks/external-prometheus.md @@ -140,7 +140,7 @@ on the Prometheus instance to power the dashboard and CLI. The `prometheusUrl` field gives you a single place through which all these components can be configured to an external Prometheus URL. -This is allowed both through the CLI and Helm. +This is allowed both through the CLI and Helm. If the external Prometheus is secured with basic auth, you can include the credentials in the URL as well. ### CLI @@ -148,7 +148,7 @@ This can be done by passing a file with the above field to the `values` flag, which is available through `linkerd viz install` command. ```yaml -prometheusUrl: existing-prometheus.xyz:9090 +prometheusUrl: http://username:password@existing-prometheus.namespace:9090 ``` Once applied, this configuration is not persistent across installs. From cb7886de855717447f31e2f0f2dbacef925c09ce Mon Sep 17 00:00:00 2001 From: JadKHaddad Date: Sun, 12 Nov 2023 20:59:15 +0100 Subject: [PATCH 2/2] Example without basic auth added. Same changes in 2.14 done Signed-off-by: JadKHaddad --- linkerd.io/content/2.13/tasks/external-prometheus.md | 11 ++++++++++- linkerd.io/content/2.14/tasks/external-prometheus.md | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/linkerd.io/content/2.13/tasks/external-prometheus.md b/linkerd.io/content/2.13/tasks/external-prometheus.md index f064dc3e1f..15f601e4d8 100644 --- a/linkerd.io/content/2.13/tasks/external-prometheus.md +++ b/linkerd.io/content/2.13/tasks/external-prometheus.md @@ -140,13 +140,22 @@ on the Prometheus instance to power the dashboard and CLI. The `prometheusUrl` field gives you a single place through which all these components can be configured to an external Prometheus URL. -This is allowed both through the CLI and Helm. If the external Prometheus is secured with basic auth, you can include the credentials in the URL as well. +This is allowed both through the CLI and Helm. +If the external Prometheus is secured with basic auth, +you can include the credentials in the URL as well. ### CLI This can be done by passing a file with the above field to the `values` flag, which is available through `linkerd viz install` command. +```yaml +prometheusUrl: http://existing-prometheus.namespace:9090 +``` + +If the external Prometheus is secured with basic auth, you can include the +credentials in the URL as well. + ```yaml prometheusUrl: http://username:password@existing-prometheus.namespace:9090 ``` diff --git a/linkerd.io/content/2.14/tasks/external-prometheus.md b/linkerd.io/content/2.14/tasks/external-prometheus.md index 0703bc166b..15f601e4d8 100644 --- a/linkerd.io/content/2.14/tasks/external-prometheus.md +++ b/linkerd.io/content/2.14/tasks/external-prometheus.md @@ -141,6 +141,8 @@ on the Prometheus instance to power the dashboard and CLI. The `prometheusUrl` field gives you a single place through which all these components can be configured to an external Prometheus URL. This is allowed both through the CLI and Helm. +If the external Prometheus is secured with basic auth, +you can include the credentials in the URL as well. ### CLI @@ -148,7 +150,14 @@ This can be done by passing a file with the above field to the `values` flag, which is available through `linkerd viz install` command. ```yaml -prometheusUrl: existing-prometheus.xyz:9090 +prometheusUrl: http://existing-prometheus.namespace:9090 +``` + +If the external Prometheus is secured with basic auth, you can include the +credentials in the URL as well. + +```yaml +prometheusUrl: http://username:password@existing-prometheus.namespace:9090 ``` Once applied, this configuration is not persistent across installs.