Reputation: 99
In multiple VM machine (15+) I use TIG framework (Telegraf, Influxdb and grafana) to monitoring system stats like (CPU, RAM, Disk etc) So data is exported via telegraf and stored in InfluxDB which is further use as datasource in Grafana. The problem I m facing is setting up alert on any system metric In Query section I uses Raw Query like this
Disk
SELECT last(used_percent) AS PercentageUsed FROM "disk" WHERE "host" =~ /$server$/ AND "path" = '/' AND $timeFilter GROUP BY time($interval), "host", "path"
CPU
SELECT mean("usage_user") AS "user" FROM "cpu" WHERE ("cpu" = 'cpu-total') AND host =~ /$server$/ AND $timeFilter GROUP BY time($interval), host ORDER BY asc
It is my requirement to use variable for simmilar stat data of all VM in one graph But the problem is I am unable to configure any alert on this query due to Error Template variables are not supported in alert queries
Upvotes: 1
Views: 1187
Reputation: 379
It does not sound like that is possible per this thread.
This means you will either have to have multiple panels - one per template variable value per panel or use regex instead of the template variable.
Upvotes: 0