I’m using Telegraf’s logparser input plugin to process a HTTP access log and want to count/aggregate the occurrence of response codes.
so basically my input is a file like this:
I want as output:
I don’t see an obvious way to accomplish this with telegraf. In logstash I would use the metrics filter and pass a variable to the metric name, basically like this: https://serverfault.com/questions/694467/how-can-i-plot-apache-httpd-status-counts-in-graphite-without-statsd-using-logst
I’ve checked for this functionality in the logparser input, basicstats aggregator, histogram aggregator but don’t see it. Is this currently not possible or am I missing something?
I’m ok with writing some code if this currently is not a feature but have no clue if this should go into the logparser input, an aggregator, or an processor plugin.