grafana / synthetic-monitoring-app

Synthetic Monitoring frontend application
https://grafana.com/docs/grafana-cloud/how-do-i/synthetic-monitoring/
GNU Affero General Public License v3.0
120 stars 17 forks source link

Self-Hosted Grafana with Reverse Proxy And Synthetics Plugin #796

Open yanickflyer opened 3 months ago

yanickflyer commented 3 months ago

What happened: Tried to connect synthetics monitoring with my self-hosted Grafana using the documentation; https://github.com/grafana/synthetic-monitoring-app?tab=readme-ov-file#configuration

But I get the following error: grafana

In the logs I get:

grafana-prod_grafana.2.q6un6o0hafbf@ip-172-31-21-81    | logger=infra.usagestats t=2024-05-23T05:41:40.667491796Z level=info msg="Usage stats are ready to report"
grafana-prod_grafana.2.q6un6o0hafbf@ip-172-31-21-81    | logger=data-proxy-log userId=1 orgId=1 uname=admin path=/api/plugin-proxy/grafana-synthetic-monitoring-app/install remote_addr=10.0.0.2 referer=https://54.226.216.175/grafana/a/grafana-synthetic-monitoring-app/home t=2024-05-23T05:44:41.220948513Z level=error msg="Proxy request failed" err="unsupported protocol scheme \"synthetic-monitoring-api-us-east-0.grafana.net\""
grafana-prod_grafana.2.q6un6o0hafbf@ip-172-31-21-81    | logger=context userId=1 orgId=1 uname=admin t=2024-05-23T05:44:41.221175488Z level=error msg="Request Completed" method=POST path=/api/plugin-proxy/grafana-synthetic-monitoring-app/install status=502 remote_addr=10.0.0.2 time_ms=79 duration=79.453777ms size=0 referer=https://54.226.216.175/grafana/a/grafana-synthetic-monitoring-app/home handler=/api/plugin-proxy/:pluginId/* status_source=downstream

What you expected to happen: The plugin to be installed as below:

image

How to reproduce it (as minimally and precisely as possible): Access Grafana through a reverse proxy like Traefik, NGINX etc... and you should get the error.

Anything else we need to know?: Managed to make it work with a Reverse Proxy with a workaround

  1. Access Grafana without reverse proxy
  2. Click on Get Started
  3. Access Grafana with Reverse Proxy and it works normally

Issue was also reported by someone on Grafana Community: https://community.grafana.com/t/error-cannot-connect-grafana-cloud-with-local-grafana-instance/116366

Environment:

beeare commented 1 month ago

I have the same problem.

Environment:

Grafana version (if running on prem): 11.1.0 SM plugin version: 1.14.10 OS Grafana is installed on: Debian GNU/Linux 11 (bullseye)

Workaround from https://community.grafana.com/t/error-cannot-connect-grafana-cloud-with-local-grafana-instance/116366 does not work in my case.

adamchalat commented 1 month ago

The same problem - any workaround or hint?

lyfenwebos commented 3 weeks ago

Okey, so after spending some time it seems that it is not that scary. Make sure that apiHost is prefixed with https://, they don't mention it in the documentation, but it seems that it is crucial.

Was able to configure it with pair of Grafanas connected to the mariadb behind HAProxy