Alert image rendered timeframe does not match alert query time

  • What Grafana version and what operating system are you using? Grafana v12.3.3 on kubernetes

  • What are you trying to achieve? Prometheus Alert emails with meaningful alert graph image

  • How are you trying to achieve it? Enabled image renderer via helm chart:
    imageRenderer:
    enabled: true
    and added to the config.ini:
    unified_alerting.screenshots:
    capture: true

  • What happened? The alert gets triggered, email sent but the embedded graph image is an unexpected timeframe. Triggered on 2026-02-16, the graph image is from 2025-12-05

  • What did you expect to happen? The original prometheus query on the alert manager is set to “now-1h to now” and the graph should reflect the same

In the logs

logger: rendering
msg: Rendering
path: d-solo/Test1Portal/test-1-portal?orgId=1&panelId=27

So I’m not sure how the time range is being defined

I also found this unanswered relatively same issue: Image rendering showing incorrect data for date values

Found part of the solution.

Grafana does request renderer to render the image. Renderer checks the panel and use the dashboard default time range for the render (doesn’t take input from the alert rule). My dashboard had a default time range set to 2 months ago and this was what’s generated in the image.

The solution, go to the dashboard and change the time range > edit > Save Dashboard > Update default time range > Save

1 Like

Thank you for the clarification — updating the dashboard’s default time range resolved the issue successfully.

I’ve opened Add time range option for linked panel to alert rule · Issue #118372 · grafana/grafana · GitHub to better manage this

1 Like