skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    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.


  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search