grafana/alerting

[Feature request] Passing alert label value to rendered panel variable

GedPL opened this issue · 2 comments

GedPL commented

Hi Team,

OS: Red Hat Enterprise Linux release 8.6 (Ootpa)
Grafana: v. 9.1.5
Plugins: Grafana Image Renderer

I have alert rule created for VMs CPU usage based on Google Cloud Monitoring data source.
As required by image rendering for email notification this rule is associated with dashboard/panel by providing DashboardID/PanelID.
However this panel content depends on $instance variable set in dashboard. So in fact panel shows VM's CPU usage for specific selected VM.

Any here is what would be nice to have - passing label value to rendered panel/dashboard (guessing this should be included in rendered URL),
For example now I can see in log file:

req="url:"https://10.10.20.20:3000/d-solo/0yDwS6W4k/xxx-vm-instances-gcp?orgId=1&panelId=47&render=1\"

and assuming I have a label $metric.label.instance_name="instance_1" in alert rule I need:

req="url:"https://10.10.20.20:3000/d-solo/0yDwS6W4k/xxx-vm-instances-gcp?orgId=1&panelId=47&render=1&instance=instance_1\"

Or maybe it would be possible in another way.

Many thanks in advance !

ged

GedPL commented

Moved to Discussion.

grafana/grafana#56004