I finally integrated log4net with fluentd, one of log messages of the system contains a breakline, when i checked the log the message didn't come complete:
{
"_index" : "log4net-2015.09.02",
"_type" : "fluentd",
"_id" : "AU-N5jryMiYcKf52S_Kz",
"_score" : 1.0,
"_source":{"thread":"1","level":"INFO","logger":"Log.Log","username":"LoggerClass","hostname":"BRD03858683","message":"2546796 ","@timestamp":"2015-09-02T08:51:57-03:00"}
}
the field message misses a few lines. Can someone help me how to insert the lines the were breaked?
and the config file:
### Listen on port 5140, module in_syslog ###
<source>
type syslog
port 5140
bind 0.0.0.0
tag syslog
</source>
### Parsing the events ###
type parser
remove_prefix syslog
format /^(?<thread>[^ ]*) (?<level>[^ ]*) (?<logger>[^ ]*) (?<username>[^ ]*) (?<hostname>[^ ]*) \[\[(?<message>[^*]*)/
key_name message
</match>
### Write parsed events to ElasticSearch ###
buffer_type file
buffer_path /mnt/ramdisk/log4net.buff
buffer_chunk_limit 4m
buffer_queue_limit 50
flush_interval 3s
type elasticsearch
logstash_format true
logstash_prefix log4net
host localhost
port 9200
</match>
Thanks!
Best Regards!
Lucas Gazire