Extract the last alert, found after a date, given as a parameter. In this case the file is .log file, and was tested with Wazuh agent log file.
- In
/src
you can find the source code of the script. - In
/output
you can find an example of the output after running the script - In
/data
you can find the log file to be parsed.
An example to run the log, can be like:
python getLastAlertLog.py -i ../data/alerts.log -o ../output/lastAlert.txt -d 2018/01/14