I have the following source:
<source>
type tail
path /var/log/multi-line.log
format_firstline /^(?<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\,\d{3})/
format multiline
format1 /^(?<time>d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\,\d{3}) (?<level>[^\s]+) (?<message>.*)/
time_format %Y-%m-%d %H:%M:%S,%L
pos_file /var/log/td-agent/multi.line.pos
tag hostname.multi.line
read_from_head true
</source>
This is to parse multi-line stack traces like this:
2015-08-02 18:42:15,367 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/someuri].[spring-rest]] [ajp-8289-12] [StandardWrapperValve.java:246] Servlet.service() for servlet spring-rest threw exception
java.io.IOException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:141)
...
I get the following warning from starting td-agent:
2015-08-03 08:50:54 +0000 [warn]: fluent/engine.rb:81:block in run_configure: parameter 'time_format' in <source>
path /var/log/multi-line.log
format_firstline /^(?<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\,\d{3})/
format1 /^(?<time>d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\,\d{3}) (?<level>[^\s]+) (?<message>.*)/
time_format %Y-%m-%d %H:%M:%S,%L
pos_file /var/log/td-agent/multi.line.pos
I'm not sure why there is warning with time_format, I passed this through fluenttular and it worked OK there. How do I correctly configure fluentd source for above stack trace logs?
The output is to ES, and I don't see any output there:
<match *.**>
type elasticsearch
host localhost
port 9200
include_tag_key true
tag_key @log_name
logstash_format true
flush_interval 10s
</match>