I'm getting the logs from an application that exports its logs in a txt file.
In Wazuh server I configured the collection of log data from files by editing ossec.conf to
<localfile>
<log_format>syslog</log_format>
<location>/var/log/*</location>
</localfile>
Then I put these txt logs within the mentioned directory on a daily basis.
Any way- I need Wazuh to choose the timestamp of the actual log -regardless of its name timestamp or timestamp1- when I create rules later
For
example, If I have a simple rule triggers an alert if a log contains a time between
6 pm - 8:30 am as follows:
<rule id="100127" level="10">
<decoded_as>test</decoded_as>
<time>6 pm - 8:30 am</time>
<description>Login outside business hours.</description>
<group>policy_violation</group>
</rule>
I need Wazuh when it tests this mentioned criteria to look at time of the actual log Not the time when the log it is read by Wazuh as the two samples: