Hi Evair,
If you need those old logs ingested to Wazuh, you may need to create a new file, add the new file in the localfile configurtaion, then write a script to parse the logs line by line to the newly created file from the old log file so the agent can start ingesting the logs. That is the only way you are able to get Wazuh to read from the old logs.
I am not very good at coding, but you can use a bash script like this.
Make a bash file.
incremental_log_copy.sh
Copy the script to the bash file added in the attachment.
Run:
chmod +x incremental_log_copy.sh
sudo ./incremental_log_copy.sh -src_log /var/log/old.json -dst_log /var/log/new.json -logs_per_run 20 -sleep_seconds 30
Parameters:
-src_log Source log file to read from (e.g., /var/log/old.json)
-dst_log Destination file to append logs to (e.g., /var/log/new.json)
-logs_per_run Number of log lines appended per run (e.g., 20)
-sleep_seconds Seconds to wait between runs (e.g., 30)