From fe7d9827294682c9a7846c83818fca0adec6500b Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Tue, 10 Dec 2024 13:04:13 +0000 Subject: [PATCH 1/2] add docs for grafana broker support --- content/docs/integrations/grafana/index.md | 29 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/content/docs/integrations/grafana/index.md b/content/docs/integrations/grafana/index.md index 15f2fb1e4..d02458ff6 100644 --- a/content/docs/integrations/grafana/index.md +++ b/content/docs/integrations/grafana/index.md @@ -19,7 +19,7 @@ The [Backstage Grafana plugin](https://www.npmjs.com/package/@k-phoen/backstage- |---: | --- | | **Prerequisites** | **Configuration Data:** **Component Annotations:** | | **Considerations** | | -| **Supported Environments** | ☐ Private Network via Broker
☐ Internet Accessible via IP Whitelist
☒ Cloud Hosted | +| **Supported Environments** | ☒ Private Network via Broker
☐ Internet Accessible via IP Whitelist
☒ Cloud Hosted | ## Prerequisites @@ -27,7 +27,14 @@ You'll need a Grafana account with an API key and the url of your Grafana UI and ## Adding the plugin -### Configure the Grafana endpoints +### Configuring Grafana Credentials + +You can choose to configure Grafana in one of two ways: + +- Assuming that there is network connectivity between Roadie and Grafana you can configure this +- or you can choose to run the Roadie Grafana broker internally to open a connection between Roadie and Grafana. + +#### Configure the Grafana endpoints for direct access Configure the Grafana endpoints to use via `Administration -> Settings -> Grafana`. If you're using grafana.net your frontend and backend endpoints should be the same e.g. `https://.grafana.net/`. If you're using hosting @@ -36,12 +43,26 @@ endpoint which the plugin uses to query alerts and dashboards. ![grafana-config.webp](./grafana-config.webp) -### Add the Grafana API Key +##### Add the Grafana API Key -Add the `GRAFANA_API_KEY` in the same page at `/administration/grafana`. +Set the Grafana Frontend URL, Backend URL and the `GRAFANA_API_KEY` in same page at `/administration/grafana`. NB: You'll need to wait for the secret to be marked as "Available" before you can use the Grafana plugin. +#### Configure Grafana via the Roadie Broker + +You will need to run the broker container in an environment that has connectivity to the Grafana API as follows: + +```bash +docker run \ + -e GRAFANA_TOKEN= \ + -e GRAFANA_URL=http:// \ + -e "BROKER_TOKEN=grafana" \ + -e "BROKER_SERVER_URL=https://.broker.roadie.so" roadiehq/broker:grafana +``` + +In `Administration -> Settings -> Grafana`, set the Frontend url to the URL at which the Grafana UI is available your users. Set the Backend URL to broker://grafana. You should leave the `GRAFANA_API_KEY` blank. + ### Add the plugin to the UI The Grafana plugin provides two components which can be added to the Backstage UI. You must be a Backstage admin to From 273fffa942c83b1f268b0790837078cae8a57503 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Tue, 10 Dec 2024 13:05:17 +0000 Subject: [PATCH 2/2] fix sentence --- content/docs/integrations/grafana/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/integrations/grafana/index.md b/content/docs/integrations/grafana/index.md index d02458ff6..1d6a8d4d9 100644 --- a/content/docs/integrations/grafana/index.md +++ b/content/docs/integrations/grafana/index.md @@ -31,7 +31,7 @@ You'll need a Grafana account with an API key and the url of your Grafana UI and You can choose to configure Grafana in one of two ways: -- Assuming that there is network connectivity between Roadie and Grafana you can configure this +- Assuming that there is network connectivity between Roadie and Grafana you can configure this using direct access. - or you can choose to run the Roadie Grafana broker internally to open a connection between Roadie and Grafana. #### Configure the Grafana endpoints for direct access