Hello,
To disable only one rule, you will have to overwrite it and set the alert level to 0. For this, you will have to create a custom rule in /var/ossec/etc/rules/local_rules.xml
and:
overwrite="yes"
to indicate that this rule is overwriting an already defined rule.Format:
<rule id="ID_TO_OVERRIDE" level="0" overwrite="yes">
. . .
</rule>
You can read the documentation on custom rules, where you have an example of how to do this overwrite:
https://documentation.wazuh.com/current/user-manual/ruleset/custom.html#changing-an-existing-rule
Regards,
Juan Cabrera
Hello,
There is no problem with having child rules whose parent rule has alert level 0. In fact, this behavior exists in the Wazuh ruleset.
The alert will still match that parent, but it will not be displayed. This is due to the log_alert_level tag in the ossec.conf
file:
<alerts>
<log_alert_level>8</log_alert_level>
<email_alert_level>12</email_alert_level>
</alerts>
Which indicates the minimum level for a rule to trigger the alert.
Regards,
Juan Cabrera
Hello,
First of all, if you are monitoring a single file, you must use the full path to the file, in this case:
<localfile>
<log_format>syslog</log_format>
<location>/home/logs/custom/FILE.log</location>
</localfile>
On the other hand, you can check if those logs are arriving to the manager. To do this, you have to change the following option in the ossec.conf
file:
<ossec_config>
<global>
....
<logall>yes</logall>
...
</global>
Restart the manager to apply the changes.
Then look into the /var/ossec/logs/archives/archives.log
file, it contains all the events, no matter whether they triggered a rule or not. Doing so, we can see if those events are reaching the manager.
If you see the logs in the archives.log
, you may have a problem with your decoders or rules. Remember that you can check that your rules generate alerts with wazh-logtest (/var/ossec/bin/wazuh-logtest
). More information is available at the following link:
https://documentation.wazuh.com/current/user-manual/capabilities/wazuh-logtest/index.html
I’d recommend you opening a new thread for every new unrelated questions you may have, instead of using always the same thread. This will help other users in the community to search and find similar questions quicker
Regards,
Juan Cabrera