Hi All, I am using filebeats to try and pull from a text file that contains http logs, the logs are generally not uniform, so I used powershell to create an end of file marker. However when I then try and send the logs into elastic and later kibana, I get one or two massive logs, not the individual components.
My original attempts to have it sort the data have all gone, rather abysmally, I was hoping someone here could give me some quick pointers to get more acclimated. Thanks!
Your configuration looks correct for the example data you posted. What I see that could be wrong is the indentation of the configuration, enabled, paths and multiline must be at the same level as type, i.e.
Hi @jsoriano, I checked the indentation, and it was incorrect in my post, I corrected it, but it looks like the indentation is correct in my config file.
@kellen.hopwood I saw you edited the sample data, take into account that with your configuration the pattern XXXXX must appear as the first line of your multiline event.
Another option you could try to avoid needing to add these placeholders is to use a pattern that matches with the usual requests you have, i.e. something like this:
multiline:
pattern: '^(GET|HTTP/)'
negate: true
match: after
Hi @jsoriano, I have been digging through my logs, and even when attempting to match the first line, with HTTP or POST or HEAD, GET, ect, I still get the entire file being sent pretty much all in one big log, and I was hoping that I could separate each packet. However with Negate True I can't seem to get the individual packets what are being separated by the matching regex. With negate off, I get each line of the log sent individually. It seems like it maybe a regex parse issue? I think I'm going to try and insert an EOF at the end of every file and the use the flush command on that.
I tried to insert a flush, point at the end of each log, however it still isn't recognizing either point, it's just grabbing all the data because it registers it all as a false, and because negate is on, it inverts that and registers it all as true. Any advice @jsoriano?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.