I created two queries: one with a regular expression wildcard (blue line), one with the fixed value ‘reject’ (green line). They display different results. See the screenshot below.
I think I might know the reason, but I’m not sure: My datasource is sending over data every 15 seconds, but the substep ‘reject’ will not always be present. Other steps will always be present (I hid them in the screenshot).
That means the query for test_Reject_mean will find values every now and again, but the query for test_(.*)_mean will always find values (just not always for ‘reject’). I can see how that could lead to a difference. I don’t understand how the blue line eventually goes to 0 though.
How do I solve this though? I want to use the wildcard, but only the green line fixed value query is showing the graph the way I want it to (after all, the ‘reject’ is not going on for minutes). The solutions I can think of:
- Make sure my datasource always sends data for every step, even if the value is 0. Either by adjusting my software, or by creating some script in telegraf.
- hardcode the steps in grafana and loop it that way.
- ??
Thanks in advance for your insight.