Hi Serano Tomas,
Hope you are doing well. Thank you for using Wazuh.
Unfortunately, it is not possible to filter rules by agent group at the moment as the rule engine has no awareness of agent groups. Here are some options with which you can achieve something similar:
Use labels: It is possible to add labels to the agent's groups that will be applied to every alert triggered by those agents. To do that you can apply a centralized configuration to set up the label for each specific group.
Once that is done you can verify the new alerts from those agents and confirm that the label is applied. You can also filter by the labels in Wazuh dashboard. And create custom rules to trigger matching labels.
Use a specific field: If you have a specific field in the alert that is common to all the agents of a group, you can edit the rules only to be triggered when that field is the expected. For example: if all the agent hostnames of the group "lab" start with "lab-" and you want to filter the rule 5701, you can create a child rule similar to this:
<rule id="100002" level="8">
<if_sid>5701</if_sid>
<hostname type="PCRE2">lab-.+</hostname>
<description>sshd: Possible attack on the ssh server </description>
<description>(or version gathering). - Known agetn</description>
</rule>
This way the rule will only be triggered when the agent hostname starts with "lab-".
As you can see in the previous image, agents starting with "lab-" trigger the custom rule, while agents that don't start with "lab-" trigger the original rule.
You can find more information about labels and custom rules on the following links:
I hope you find this information helpful. Let me know if you have any questions.
--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/0d0c6792-2af3-426e-a88f-d9c2a644304fn%40googlegroups.com.