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:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user