It does however work with:- include_lines: [".*returned the status.*",".*information from the green Server.*"]
However, for some strange reason lots and lots of other lines are also being caught and sent into ES.
My questions are:-
Why is filebeats borking at the \s in the regex??
What regex implementation does Filebeats actually use?
Thanks.
UPDATE
Bit more testing. I simplified the include_lines to be a single expression:- include_lines: ["returned the status"]
But I am getting all manner of lines sent into ES. Not just the lines one might expect.
This is on a Windows machine. Can anyone shed any light on why "inlclude_line" is just doing its own thing?
I have now tried many combinations of regex using:
include_lines and exclude_lines
There appears to be no way to only collect the lines that I want. Every combination I have tried thus far has resulted in completely unexpected lines also being shipped to elasticsearch.
As far as I can tell include_lines and exclude_lines simply do not work. I have reduced this problem down to a very simple scenario where all I want to send to Elasticsearch are lines matching a very simple pattern. No matter what I do, everything is sent.
Can anyone please chime in here and advise if this is a known issue on Windows? PLEASE?
The indentation for the encoding and include_lines options is wrong. They need to be moved 4 spaces to right because they are options associated with the prospector. See the indentation is the default config file: https://github.com/elastic/beats/blob/1.2/filebeat/etc/filebeat.yml#L41
Also include_lines expects a list of strings and not a single string. So enclose the value in ["value"] in brackets.
The encoding you specified for the log file does not match the sample log file you sent. There is no BOM in that file so just remove the encoding setting from your config file.
Yes, that was it. Now getting what I need. Thank you so much.
Now that it is only processing the lines I need, however, the filebeats.exe is taking 70% CPU on the host machine. Will need to look into that in the morning.
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.