You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending on the specific wildcards used in a set of patterns, there is sometimes also an ordering dependency, where switching two patterns filters correctly.
Yes, I know the naming here is an antipattern and they should be tagged like process32,exe=testcase.exe,activity=caserunner,act_id=2222 cpu=42 ... but these metrics are from a legacy system, we're having to ingest them using the existing names "for historical reasons".
I believe this behaviour is due to bugs in the gobwas/glob library (several cases of unexpected pattern behaviour have been reported over its lifetime) and I've created issue gobwas/glob#50 there, but there may also be mitigations or changes to make in Telegraf:
Telegraf currently composes the individual patterns into a single glob "alternates" construct, e.g. {*process32:*.exe:*.*,otherWantedMetric*} which seems to be a case where gobwas/glob fails
it might be worth looking at alternative invocations, like explicit checks on each pattern - if the performance of that isn't dreadful
I'd suggest trying another glob library, but I've had a look and can't find anything suitable (supporting *, ?, [] and {} which existing Telegraf users may depend on (although, if they're not reliable, cough))
How much work would it be to implement a suitable/compatible glob function internal to telegraf vs. contributing fixes to the gobwas library ...
The text was updated successfully, but these errors were encountered:
I realise 1.13 is fairly old now, so I've just repeated the test using a 1.18.2 binary download, and with a local build from nearly-current master branch:
Relevant telegraf.conf:
System info:
Telegraf 1.13.3 (git: HEAD da36455)
Steps to reproduce:
Expected behavior:
Metrics are correctly filtered:
Actual behavior:
Some metrics are dropped when they should be passed (or vice versa for "drop" rules):
Additional info:
Removing
otherWantedMetric*
from the filter list, permits the "process32" ones to pass:Depending on the specific wildcards used in a set of patterns, there is sometimes also an ordering dependency, where switching two patterns filters correctly.
I believe this behaviour is due to bugs in the gobwas/glob library (several cases of unexpected pattern behaviour have been reported over its lifetime) and I've created issue gobwas/glob#50 there, but there may also be mitigations or changes to make in Telegraf:
{*process32:*.exe:*.*,otherWantedMetric*}
which seems to be a case where gobwas/glob fails*
,?
,[]
and{}
which existing Telegraf users may depend on (although, if they're not reliable, cough))The text was updated successfully, but these errors were encountered: