Configure multi line in logstash

Hello,

This is my config file:

input {
	file {
		path => "/tmp/CIPAV/result/*.xml"
		start_position => "beginning"
		sincedb_path => "NUL"
		codec => multiline {
				 pattern => "^<?xml version .*\>"
				 negate => true
				 what => "previous"
				 auto_flush_interval => 1
		}
	}
}

and this my input file format:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Exchange Type="end">
	<Exchange_id>1546548616518T</Exchange_id>
	<Exchange_name>CIPAV Monitoring</Exchange_name>    
	<Exchange_end_date>2016-05-17 16:12:22</Exchange_end_date>
	<Domain_name>CIPAV</Domain_name>
	<Half_exchange>
		<Half_exchange_name>OPEX</Half_exchange_name>    		
		<Half_exchange_end_date>2016-05-17 16:12:22</Half_exchange_end_date>
	</Half_exchange>
</Exchange>

The problem is that when a new file arrives at /tmp/CIPAV/result/ directory, logstash can't treat it, so I need to kill my process and then restart logstash to treat it.. I think my multiline patter has a concern..

Thanks for any help !

On non-Windows systems, use sincedb_path = "/dev/null" rather than sincedb_path => "NUL".

I have usually the same issue.. To let logstash treat the com in file, I need to create empty lines and then save the file, or to restart logstash .

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.