Hello there,
I needed values from another same type of logs. So I was exploring the <accumulate /> option in decoders. But It is not working as expected.
Here is my agent side conf:
And I am getting logs (sample logs given) like this in manager (archives.log):
Here is my decoders:
Here is my rules:
Here is my logtest result:
I was expecting those mailcow.one, mailcow.two values will also appear in the second log test. But it is not accumulating previous values. What are the things I am missing?
Or is there any other ways to do so rather than the <accumulate /> option?
FYI, using Wazuh v4.8.0.
Regards.
Hi Nahid,
The <accumulate/> option checks if the processed log gets an ID field decoded. In this case, it brings from previous logs using the same ID value the following fields to populate the alerts for the log (static fields), if these fields were previously decoded.
It means it accumulates what is known for these specific fields from previous logs. You need to decode your ID field using the ID field name. Similarly, the fields that get accumulated are those specific fields mentioned above and not any field decoded with generic names. I understand it works for syslog-like logs that share same information like the same hostname. It also has an expiration time of 120 seconds.
That is why the use case you have tried did not work correctly, because it does not accumulate the dynamic fields that have been patched.
Maybe you can expand your use case. Wazuh has the multi-line log format option as well as the multiline_regex.
I hope this helps.
Hello Marcel,
Hope you are doing great. Thanks for your reply.
After your explanation I was looking at the source file src/analysisd/accumulator.c and found this snippet:
I think I got the things. Thank you so much.
Regards.