Count/increment is not working in logstash -
i filter "status code" output attribute each line. like, code = 100, code = 100, code = 200, code = 200,code = 200,code = 300
here, i'm trying count of each type of status codes 100 = 2, 200 = 3, 300 = 1
the config working on looks like,
filter { grok { patterns_dir => ["./patterns"] match => [ "message", ["%{custompattern:code}" ]] } mutate { remove_field => ["host", "path", "@version", "@timestamp"] } } output { statsd { increment => "%{code}" count => ["code", "%{code}"] } stdout { codec => json } }
i know statsd config wrong, couldn't fix it.
Comments
Post a Comment