Regarding filebeat offset , The value of offset for the lines in the same log file is not shown in sequential order based on order of line numbers in the file.
I've some queries on the filebeat offset .
Is the offset the line offset or byte offset .
Is there any way by which I can the get the line number of particular file on sequential order so that the lines can be sorted based on line number or offset.
Can we reset the offset value to 0 so that the offset get incremented after reading each line of the file.
I think what you are looking for is offset. You mentioned in the beginning that it is not necessarly the same order, but that shouldn't be. If that is the case, can you share some more details?
en. there is a case in our company. we use filebeat collect log file and send to elasticserch.
we search something from elasticsearch, if we select one result, we want to see 10 lines above it and 10 lines before it according the order in the original log file.
in the first time, we sort by timestamp ,but it does not work well, beacuse timestamp my be the same value.
in the second time, we sort by offset only, but it has the same value.
at the end, we sort by both timestamp and offset, it seems work well.
but i find a pull in kibana can solve it.
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.