Telegraf LogParser Windows multiple grok patterns

Hey guys,

We have successfully implemented loparser using telegraf in one of our window server and we have created a histogram metric on top of that.

The log file that we are parsing is a set of URLs and we are filtering specific URLs using custom pattern and the buckets are created for each different URL.

But, we want to parse one more URL but no histogram for that. We just want a gauge/untyped metric for that URL.

Is it possible to create multiple grok patterns and multiple custom patterns so that for the new URL we will give a different field name so that the histogram wont be built for that URL.

Any help provided is greatly appreciated. Thanks.



We just tried by giving multiple patterns comma seperated and looks like only the last pattern in the list is showing up in the metric and not both.

Is it possible to use metric filtering on the aggregator to exclude the URL you don’t want to aggregate? That would be the easiest way, but if that won’t work you can have two custom_patterns and have the main pattern alternate: %{PATTERN_ONE}|%{PATTERN_TWO}, just make sure the patterns don’t both match a single line.