Setting log levels in OSSEC to be collected in Windows.

78 views
Skip to first unread message

ocerna0721

unread,
Oct 18, 2023, 1:12:43 PM10/18/23
to Wazuh | Mailing List
Hello, Wazuh community,

This time, I bring the following question:
I have created the following configurations for the <localfile> modules for Windows. The modules are Security, Application, and System. Here's the code:

<localfile>
    <location>Application</location>
    <log_format>eventchannel</log_format>
    <query>
        Event[System[EventID] and (Level != 4 and Level != 0)]
    </query>
  </localfile>

<localfile>
    <location>Security</location>
    <log_format>eventchannel</log_format>
    <query>Event[System[not(EventID = 5145 or EventID = 5156 or EventID = 5447 or
      EventID = 4656 or EventID = 4658 or EventID = 4663 or EventID = 4660 or
      EventID = 4670 or EventID = 4690 or EventID = 4703 or EventID = 4907 or
      EventID = 5152 or EventID = 5157) and not(Level = 4 or Level = 0)]]</query>
  </localfile>

<localfile>
    <location>System</location>
    <log_format>eventchannel</log_format>
    <query>
        Event[System[EventID] and (Level != 4 and Level != 0)]
    </query>
  </localfile>

What I'm trying to do is to have it send me all EventIDs that are different from levels 4 and 0. In my configuration, I don't need to receive Windows EventIDs that are informational. I only want to receive critical, error, warning, and verbose EventIDs.

After applying the query, I have been monitoring and testing to generate alerts for these three mentioned types, but they are not being sent to the Wazuh server. Is it possible that there is an error in the query?

Mauricio Ruben Santillan

unread,
Oct 23, 2023, 5:26:08 PM10/23/23
to Wazuh | Mailing List
Hello!

Thanks for being part of the Wazuh community!


Please follow it up there.

Thank you!

ocerna0721

unread,
Oct 27, 2023, 7:02:57 PM10/27/23
to Wazuh | Mailing List
Thank you for the information.
Reply all
Reply to author
Forward
0 new messages