SynMon app configuration expects a scheme for the API URL
Tristan971 opened this issue · 2 comments
What happened:
Trying to add the SynMon app provisioning, I get an error when clicking "Initialize the plugin":
[...] msg="Proxy request failed" err="unsupported protocol scheme \"synthetic-monitoring-grpc-ap-southeast-0.grafana.net\""
Just in case it was a parsing issue and ignored, I also tried adding https:// in front, but it does (expectedly) fail when trying that:
msg="Proxy request failed" err="net/http: HTTP/1.x transport connection broken: malformed HTTP response \"\\x00\\x00\\x06\\x04\\x00\\x00\\x00\\x00\\x00\\x00\\x05\\x00\\x00@\\x00\""
What you expected to happen:
I expect the provisioning configuration to be usable on a selfhosted instance of Grafana
How to reproduce it (as minimally and precisely as possible):
Stand up a Grafana instance with latest Grafana image at the time of writing (v9.4.3), install the synmon plugin, then try to provision it with the following (assuming the 2 datasources were provisionned correctly too, which is the case for me):
apiVersion: 1
apps:
- type: grafana-synthetic-monitoring-app
name: grafana-synthetic-monitoring-app
disabled: false
jsonData:
apiHost: synthetic-monitoring-grpc-ap-southeast-0.grafana.net:443
stackId: $redacted
logs:
grafanaName: grafanacloud-$redacted-logs
hostedId: $redacted
metrics:
grafanaName: grafanacloud-$redacted-prom
hostedId: $redacted
secureJsonData:
publisherToken: $redacted
Anything else we need to know?:
Environment:
- Grafana version (if running on prem): 9.4.3
- SM plugin version: 1.9.35
- OS Grafana is installed on: official docker image, looks like Alpine 3.15.7
- User OS & Browser: Windows and Edge 110
- Others: N/A
Fwiw the solution is to use https://synthetic-monitoring-api-ap-southeast-0.grafana.net
instead.
Which goes against the documentation linked from https://grafana.com/grafana/plugins/grafana-synthetic-monitoring-app/, which points to https://github.com/grafana/synthetic-monitoring-api-go-client/blob/58afdc8087623db5438bd7caecf55833a3350bc4/docs/API.md?plain=1#L7-L11
At least in so far as the generated provisioning file uses the "API server URL", the documentation mentions "the URL of the API server" and yet it seems that the right-side column is the one we should use:
Apologies to not get back to you quicker, but looks like you found your answer. Thank you for both logging the issue and the answer! The wording of the documentation is indeed confusing. Probes need to connect to the api over GRPC, the plugin however just uses regular ol' HTTP.