certego/fw1-loggrabber

[Feature] contribution Add fileid, commandline arguments and last_record_location

Opened this issue · 2 comments

I want to add fileid in each events where fileid is unique id of each fw.log.

I have created the pull request for the same. @adepasquale Can you please review it?
#41

I have also added below commits in the fork branch

Changes contains two parts:
(1) Added the fileid in the events where fileid is the unique id of each fw.log
links:

(2) Added code to support last_record_location along with the read cursor file.

Description about last_record_location:

Support of the last_record_location along with the cursorfile. We should able to pass the last_record_location as commandline argument. last_record_location would be like

{fileid:loc}
i.e.
{123333:3232}
. We can use this parameter to get the events from the particular location. So if we pass the commandline argument last_record_location, We will use the argument instead of the cursor file.

(1) If current fileid matches with the --last_record_location fileid then only we will use the loc to get the next events from the same fileid.
(2) If current fileid will not match with the stored fileid then we will read the whole fw.log file.

(3) Command line arguments along with fw1-loggrabber.conf and lea.conf