grafana / synthetic-monitoring-app

Synthetic Monitoring frontend application
GNU Affero General Public License v3.0
144 stars 19 forks source link

Apostrophes or commas in job names result in broken dashboards #610

Open rdubrock opened 1 year ago

rdubrock commented 1 year ago

This is probably not a Synthetics bug, but rather because of the way Grafana is escaping characters in dashboard variables

A query with a value that has an apostrophe returns No data on a dashboard, but works just fine in Explore.

Example in Explore of the Uptime query: Screenshot 2023-09-19 at 09 31 40

The same query using a variable in a dashboard: Screenshot 2023-09-19 at 09 31 30

peterschretlen commented 7 months ago

I have hit the same problem when I have a comma in the job name. Updating the title

rdubrock commented 7 months ago

I think commas specifically are a different issue. I think commas is a problem with how scenes/grafana is parsing values to put in the URL, whereas single quotes is a problem with how Mimir handles quote escaping when executing a query. Not 100% sure on that, but I think that's what's happening. Here's the issue in Scenes: https://github.com/grafana/scenes/issues/683

peterschretlen commented 6 months ago

@ckbedwell @VikaCep should we maybe add some validation to job names?
To work properly, it would probably need to be done at the API level too (so terraformed synthetics would also fail to be created), but for UX I think doing some fontend validation would probably help folks avoid this.

VikaCep commented 3 months ago

@ckbedwell @VikaCep should we maybe add some validation to job names? To work properly, it would probably need to be done at the API level too (so terraformed synthetics would also fail to be created), but for UX I think doing some fontend validation would probably help folks avoid this.

PR with frontend validation on the job name: https://github.com/grafana/synthetic-monitoring-app/pull/902