Hi @georgerobinson TL;DR you have helped me fix it so thank you…but i don’t think it is as you explained. Please help me understand.
This is my script on the telegraf side:
echo “acro_test,test_type=alert_test_simple,source=router1,name=et1,description=isp-test1 in_pct=5,out_pct=5”
echo “acro_test,test_type=alert_test_simple,source=router1,name=et2,description=isp-test2 in_pct=10,out_pct=10”
echo “acro_test,test_type=alert_test_simple,source=router1,name=et3,description=isp-test3 in_pct=15,out_pct=15”
As you can see, this script feeds measurements to telegraf via influx line protocol. I attempt to cause alerts by changing the “in_pct” field in one or more of the lines in the script. i am using “source” and “name” as labels because those are the labels used by the telegraf input plugin that we primarily use (gnmi).
So what I did is add another section the the script like so:
echo “acro_test,test_type=alert_test_noname,source=router1,interface=et1,description=isp-test1 in_pct=5,out_pct=5”
echo “acro_test,test_type=alert_test_noname,source=router1,interface=et2,description=isp-test2 in_pct=10,out_pct=10”
echo “acro_test,test_type=alert_test_noname,source=router1,interface=et3,description=isp-test3 in_pct=15,out_pct=15”
As you can see, “name” is now “interface”. Et voila, multi-dimensional alerts work like they should. So great news there.
HOWEVER
I don’t think I was doing what you indicated, or perhaps I misunderstand. I had no such
custom label that you’ve added to the your rule that is also called name
The only mention of name
in my nonworking rule occurs in the query itself:
SELECT
mean(“in_pct”) as “IN_PCT”
FROM
“autogen”.“acro_test”
WHERE
“test_type”::tag = ‘alert_test_simple’
AND $timeFilter
GROUP BY
time($__interval)
,“name”::tag
(i was also doing format as time series
and alias by $tag_source $tag_name
. So i don’t think i was overriding anything so much as i was just using unfortunately-named tags to begin with. Essentially I think Grafana alerting doesn’t like queries that GROUP BY
a tag called name
that is present in the raw measurement data. Do i have that right?