For the given log
[2024-12-20T09:57:29.761885+01:00] [GF 7.0.12] [INFO] [] [jakarta.enterprise.logging.stdout] [tid: _ThreadID=73 _ThreadName=http-listener-1(4)] [levelValue: 800] [[ 176781679 [http-listener-1(4)] INFO ma.kw.kls.KlsAppRepository - path = klsapp/993b8aef3b52cb7a8ada53c47c0aa20a/service_acquisition_6807718]]
You can create the decoder like:
<decoder name="decoder">
<prematch>jakarta.enterprise.logging</prematch>
</decoder>
<decoder name="decoder_child">
<parent>decoder</parent>
<regex>_ThreadID=(\.+) </regex>
<order>_ThreadID</order>
</decoder>
<decoder name="decoder_child">
<parent>decoder</parent>
<regex>_ThreadName=(\.+)] </regex>
<order>_ThreadName</order>
</decoder>
<decoder name="decoder_child">
<parent>decoder</parent>
<regex> path = (\.+)</regex>
<order>path</order>
</decoder>
Modify the decoder as per your requirement. To learn more about custom decoder please refer to
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/decoders.html.
We recommend creating custom rules and decoders based on archives.json because in these logs we can see the field full_log, which is the one being parsed by analysis, one of the archives.json events should look like this (the field of interest is in bold): {"timestamp":"2023-09-05T02:47:40.074+0000","agent":{"id":"001","name":"abc","ip":"10.0.2.29},"manager":{"name":"Server85"},"id":"1693882060.373586","full_log ":"
Sep 5 03:10:19 Server91 dbus-daemon[676]: [system] Successfully activated service 'org.freedesktop.UPower'","predecoder":{"program_name":"dbus-daemon","timestamp":"Sep 5 03:10:19","hostname":"Server91"},"decoder":{},"location":"/var/log/syslog"}
https://wazuh.com/blog/creating-decoders-and-rules-from-scratch/Hope this helps