Agent Disconnect - Help me

31 views
Skip to first unread message

Facu Basgall

unread,
Oct 31, 2025, 9:45:44 AM (5 days ago) Oct 31
to Wazuh | Mailing List

I want to create a rule based on 504, 506 and 503 to raise to level 12 when an agent goes offline at a certain time (e.g. from 18:00 to 21:00). But I want to base it on a list of agents or on a variable where I define the critical agents

Can you help me please?

Olamilekan Abdullateef Ajani

unread,
Oct 31, 2025, 10:30:21 AM (5 days ago) Oct 31
to Wazuh | Mailing List
Hello,

I have configured something similar to this before, you need to create a variable with the agent name to capture the group of agents in question. Please see a sample custom rule used below for this use case.

<var name="sensitive-server">ubuntu-new|windows10-agent|ubuntu-ag</var>
<group name="agent-stat">
<rule id="121506" level="7">
    <if_sid>506</if_sid>
    <match>$sensitive-server</match>
    <time>2 pm - 8:30 pm</time>
    <description>sensitive server with Wazuh agent stopped.</description>
</rule>
</group>

You can find reference about the time option and other configurable rule options below:

Please let me know if you require further assistance on this.

agent-stop.png
agent-start.png

Facu Basgall

unread,
Oct 31, 2025, 12:51:48 PM (4 days ago) Oct 31
to Wazuh | Mailing List

I've been testing the rule configuration but it doesn't work for me.

I have configured so that every time an agent is disconnected or the service is stopped, it raises it to level 12, but I want to add the list of excepted servers in certain time ranges because in those times they are scheduled to restart and it is a normal behavior

I attach my rule file, if you can help me please because it does not work.

agent-disconect.xml

Olamilekan Abdullateef Ajani

unread,
8:31 AM (14 hours ago) 8:31 AM
to Wazuh | Mailing List
Hello,

Please review the attached file. I made use of your rules and it worked with little tweaks in the time. Please for proper management, also follow the syntax as defined in the documentation, you can also use the sample I created as baseline too.

Please let me know if you require further clarification on this.
agent-time.png
agent-time-2.png
Reply all
Reply to author
Forward
0 new messages