diff --git a/agent.conf.erb b/agent.conf.erb index fc639a3..6a13b0f 100644 --- a/agent.conf.erb +++ b/agent.conf.erb @@ -8,4 +8,23 @@ input { } } +# You can check grok patterns at http://grokdebug.herokuapp.com/ +filter { + grok { + type => "jenkins_console" + pattern => [ "%{DATESTAMP:logdate} \| %{GREEDYDATA:logmessage}" ] + add_field => [ "received_at", "%{@timestamp}" ] + } + date { + type => "jenkins_console" + exclude_tags => "_grokparsefailure" + match => [ "logdate", "yyyy-MM-dd HH:mm:ss.SSS" ] + } + mutate { + type => "jenkins_console" + exclude_tags => "_grokparsefailure" + replace => [ "@message", "%{logmessage}" ] + } +} + <%= scope.function_template(['openstack_project/logstash/redis-output.conf.erb']) %>