Hi Alvaro,
I did an experiment modifying <log_format>:
<log_format>multi-line: 6</log_format>
Then, I created some logs with the same 6 first lines and adding more 3, 6, 9 lines.
When I executed the following command, I saw this:
# tail -f /var/ossec/logs/archives/archives.log
Output adding 3 lines:
2020 Feb 05 09:15:00 host->/var/ossec/logs/example.log accountId:213 configId:5300 checksum:fffffffffffff format:CEF startTime:456 endTime:789
Output adding 6 lines:
2020 Feb 05 09:15:26 host->/var/ossec/logs/example.log 1 line 2 line 3 line 4 line 5 line 6 line
2020 Feb 05 09:15:26 host->/var/ossec/logs/example.log accountId:213 configId:5300 checksum:fffffffffffff format:CEF startTime:456 endTime:789
Output adding 9 lines:
2020 Feb 05 09:16:20 host->/var/ossec/logs/example.log 1 line 2 line 3 line 4 line 5 line 6 line
2020 Feb 05 09:16:20 host->/var/ossec/logs/example.log accountId:213 configId:5300 checksum:fffffffffffff format:CEF startTime:456 endTime:789
It seems that the log is being separated automatically. It is divided by every 6 lines.
Rules are generated correctly:
** Alert 1580890500.32423: - local,syslog,sshd,
2020 Feb 05 09:15:00 host->/var/ossec/logs/example.log
Rule: 100002 (level 7) -> 'Imperva: Multiple logs'
** Alert 1580890526.32665: - local,syslog,sshd,
2020 Feb 05 09:15:26 host->/var/ossec/logs/example.log
Rule: 100002 (level 7) -> 'Imperva: Multiple logs'
** Alert 1580890580.32907: - local,syslog,sshd,
2020 Feb 05 09:16:20 host->/var/ossec/logs/example.log
Rule: 100002 (level 7) -> 'Imperva: Multiple logs'