Hi Rana!
There is a way to make same manipulations on the logs using out_format option in localfile , that allow you to add a tag to certain logs.
For example, this localfile entry on ossec.conf will add a header with timestamp, hostname, a fixed string and log content to the logs from /var/log/mongodb/mongodb.log
<localfile>
<log_format>syslog</log_format>
<location>/var/log/mongodb/mongodb.log</location>
<out_format>$(timestamp) $(hostname) mongodb: $(log)</out_format>
</localfile>
I hope it helps. Let me know if you need anything else.
Regards,
Nico
Hi Rana,
I saw from your other thread that you use Wazuh v.3.12.0. This version has a issue (https://github.com/wazuh/wazuh/issues/4877) related to the problem with out_format and it was solved in v3.12.3. I’ve just test it and works perfectly.
Sorry for the inconvenience.
Regards,
Nico