Screenshot in notification for wrong instance

I have Grafana 9.3.11 in Docker with rendering plugin and screenshots in notifications.
As contact points I use webhook.

The problem is that Grafana taking screenshot for first instance in the list.
For example: I have App and DB server. Alert triggered on DB server, but I receive screenshot of metrics for App server.

Does anybody worked around this problem?

By list, do you mean variables? So you have one graph e.g. cpu and you just change the instance? Sometimes a screenshot would be useful. That’s the way the hassles are and no one will be willing to deal with it.

Yep. I mean variable in dashboard. E.g node exporter dashboard have a host variable that we can change in dashboard or panel. And for some reason I receive screenshot not for all instances, nor for triggered instance, but for first instance in variable values list.

@azhinu did you ever figure it out? I’m facing the same issue

Unfortunately, no.

Hi,

has anyone figured out a solution for this problem? We’re running in the same issue for lots of alerts, which have linked dashboards/panels.

We were able to fix the problem for the dashboard/panel links like this in the ng_alert_notification.html template file:

...
<a href="{{ .DashboardURL }}/?var-environment={{ .Labels.environment }}&var-instance={{ .Labels.instance }}" rel="noopener" style="display: inline-block; background: #3D71D9; color: #ffffff; font-family: Inter, Helvetica, Arial; font-size: 13px; font-weight: normal; line-height: 120%; margin: 0; text-decoration: none; text-transform: none; padding: 5px 12px; mso-padding-alt: 0px; border-radius: 3px;" target="_blank"> View dashboard </a>
...
<a href="{{ .PanelURL }}&var-environment={{ .Labels.environment }}&var-instance={{ .Labels.instance }}" rel="noopener" style="display: inline-block; background: #3D71D9; color: #ffffff; font-family: Inter, Helvetica, Arial; font-size: 13px; font-weight: normal; line-height: 120%; margin: 0; text-decoration: none; text-transform: none; padding: 5px 12px; mso-padding-alt: 0px; border-radius: 3px;" target="_blank"> View panel </a>
...

But it seems, there’s no working solution for the image renderer extension for embedded images. We tried to adjust the ImageURL in the template, but this has no effect:

<a href="{{ .ImageURL }}&var-environment={{ .Labels.environment }}&var-instance={{ .Labels.instance }}" target="_blank" style="color: #6E9FFF;">
                                                <img height="auto" src="{{ .ImageURL }}&var-environment={{ .Labels.environment }}&var-instance={{ .Labels.instance }}" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="600">