I am trying to implement filters such as the following in agent.conf:
<localfile>
<location>Microsoft-Windows-DNS-Client/Operational</location>
<log_format>eventchannel</log_format>
<query>
\<Select Path="Microsoft-Windows-DNS-Client/Operational">*[System[(EventID=3008)]]\</Select>\
\<Suppress Path="Microsoft-Windows-DNS-Client/Operational">*[EventData[Data[@Name="queryOptions"]="140737488355328"]]\</Suppress>\
\<Suppress Path="Microsoft-Windows-DNS-Client/Operational">*[EventData[Data[@Name="queryResults"]=""]]\</Suppress>\
</query>
</localfile>
The Wazuh agent complains that agent.conf is corrupted, *without* giving any indication why.
Question 1:
What is wrong in the above XPATH query?
Question 2:
Are any practical examples of advanced XPATH queries published, or at least a reference that explains what is doable and what is not, and a guide as to how to construct advanced XPATH queries.
The Microsoft reference in the Wazuh documentation is useless and does not really explain anything.
Question 3:
It is more manageable to split queries for Security Log events into multiple localfile rules all pointing to the Security log.
Does this have a negative impact on performance versus specifying multiple XPATH queries in one localfile rule, assuming these queries can be expressed (a very iffy assumption)?
In other words, does joining XPATH queries from the same log file improve performance? Can someone explain why, or why not?