Better multiline handling for Jenkins console logs

* 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
This commit is contained in:
Clark Boylan 2013-04-11 12:06:21 -07:00 committed by Jenkins
parent 07261689b6
commit 17ac82d873
1 changed files with 3 additions and 7 deletions

View File

@ -18,17 +18,13 @@ filter {
}
multiline {
type => "jenkins_console"
pattern => "^\"'$"
what => "previous"
}
multiline {
type => "jenkins_console"
pattern => "^Extracting templates from packages"
negate => true
pattern => "^%{DATESTAMP} \|"
what => "previous"
}
grok {
type => "jenkins_console"
pattern => [ "%{DATESTAMP:logdate} \| %{GREEDYDATA:logmessage}" ]
pattern => [ "^%{DATESTAMP:logdate} \| %{GREEDYDATA:logmessage}" ]
add_field => [ "received_at", "%{@timestamp}" ]
}
date {