I am using Grafana 9.4 for dashboarding and alerting. I would like to have an alert based on a Prometheus but filter its results against a list of valid values from a SQL query.
I have the equivalent in a panel in my dashboard with:
- Query A:
- A Prometheus metric with labels like {tenant="tenant1", ...} and legend set to
{{tenant}}
. It is set with Table format and Instant type.
- A Prometheus metric with labels like {tenant="tenant1", ...} and legend set to
- Query B:
- A SQL datasource returning a table with fields
tenant
andis_visible
.
- A SQL datasource returning a table with fields
- Tranforms
Merge
(combines using fieldtenant
)Filter data by values
(checks for is_visible=1)Grouping to matrix
- Column: tenant
- Row: Time
- Cell Value Value
Is this possible with alerting?