dhcp-relay responses monitoring needed

I need to monitoring responses in dhcp-relay. If amount of responces=0 in 1 minute, router should be rebooted

I need somthing like:

:delay 1m
/ip dhcp-relay monitor relayname once
:if ([responses] = 0) do={/system reboot;};

Who can help me please

check this

:local resp
/ip dhcp-relay monitor 0 do={
:set resp ( responses) } once;
:if ($resp = 0 ) do={
/system reboot;}

c0d3rSh3ll thank you very much +1 :wink:


and maybe you can add…

if responses = 0 and if requests > 0



:local resp;
:local req
/ip dhcp-relay monitor 0 do={
:set resp ( responses);
:set req (requests );
} once;
:if [ ($resp = 0 ) && ($req > 0)] do={
/system reboot;
}some other thing? :smiley:

c0d3rSh3ll you are the best :slight_smile:

if requests more 50 than responses (example req 1500 resp 400)

:if [ ($req - $resp > 50)] ??