2

I'm trying to set up alerts on one of my graphs. I'm using AMG (Amazon Managed Grafana). However, I'm getting "Failed to test the rule" notification. When I inspect HTTP response, it shows

Status Code: 500 Internal Server Error

{"message":"Failed to test rule"}

URL

https://g-39e1d60d36.grafana-workspace.us-east-1.amazonaws.com/api/alerts/test

Here is my alert setup (even If I try something super simple, still getting the same issue): enter image description here

To me, it seems like Grafana internal error/bug, does anyone experience a similar issue and know the potential resolution?

TariqN
  • 668
  • 2
  • 9
  • 27

2 Answers2

1

For us the solution was to not set the datasource dynamically from the environment variable we added in the interface. When we moved the target query to a fixed datasource, it all worked ok.

Peterdk
  • 15,625
  • 20
  • 101
  • 140
0

The issue was resolved after I changed the data source of the query from a defined variable e.g ${PrometheusSource} to a specific source instance PrometheusProduction. Seems like Grafana has some issues when setting up an alert for the query where the data source is a predefined variable.

For more context, I'm posting a screenshot from the Grafana dashboard:

enter image description here

After this change, the mentioned issue is not appearing anymore.

TariqN
  • 668
  • 2
  • 9
  • 27