4fcc68924c
* modules/openstack_project/templates/logstash/agent.conf.erb: Treat any line not beginning with a timestamp in Jenkins console logs as belonging to the previous log message. This keeps timestamps sane for messages that do not have timestamps. Change-Id: I5959e766c28efebbd6c44567262beb63ad3a0a8e Reviewed-on: https://review.openstack.org/26777 Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
input {
|
|
pipe {
|
|
command => "python3 /usr/local/bin/log-pusher.py -r -z tcp://jenkins.openstack.org:8888 -l http://logs.openstack.org -f console.html"
|
|
format => "json"
|
|
message_format => "%{event_message}"
|
|
tags => ["jenkins", "console"]
|
|
type => "jenkins_console"
|
|
}
|
|
}
|
|
|
|
# You can check grok patterns at http://grokdebug.herokuapp.com/
|
|
filter {
|
|
grep {
|
|
type => "jenkins_console"
|
|
# Drop matches.
|
|
negate => true
|
|
match => ["@message", "^</?pre>$"]
|
|
}
|
|
multiline {
|
|
type => "jenkins_console"
|
|
negate => true
|
|
pattern => "^%{DATESTAMP} \|"
|
|
what => "previous"
|
|
}
|
|
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}" ]
|
|
}
|
|
mutate {
|
|
type => "jenkins_console"
|
|
exclude_tags => "_grokparsefailure"
|
|
remove => [ "logdate", "logmessage" ]
|
|
}
|
|
}
|
|
|
|
<%= scope.function_template(['openstack_project/logstash/redis-output.conf.erb']) %>
|