Community discussions

MikroTik App
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Netwatch - False Alarm

Tue Dec 09, 2014 2:03 pm

I have setup Netwatch to ping routers (ping timeout 2000ms) with interval of 5mins and email if down and email when restored,
However I get regular alert emails reporting ping failure and a few mins later ping restored, alert emails are reported for several
routers at a random times, on checking each of the reported routers logs nothing is listed at that time and this leads me to believe
that this could be a false alarm by the router (RB1100) running netwatch, how do I fault find this as when a genuine ping failure occurs I may ignore as another false alarm?
 
User avatar
mishaM
Frequent Visitor
Frequent Visitor
Posts: 84
Joined: Sun Oct 25, 2009 1:48 pm
Location: Georgia

Re: Netwatch - False Alarm

Tue Dec 09, 2014 3:49 pm

you can use this script for corect cheking when down or up :
:local repeat 5
:local pcount [/ping 192.168.100.100 count=$repeat size=64 interval=1000ms];
:log info $pcount;
:if(($pcount = 0)) do={
:log error "way to  192.168.100.100 is down";
# some email send script
}
 
n21roadie
Forum Guru
Forum Guru
Topic Author
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Netwatch - False Alarm

Tue Dec 09, 2014 9:38 pm

you can use this script for corect cheking when down or up :
:local repeat 5
:local pcount [/ping 192.168.100.100 count=$repeat size=64 interval=1000ms];
:log info $pcount;
:if(($pcount = 0)) do={
:log error "way to  192.168.100.100 is down";
# some email send script
}
I use netwatch to trigger a script when "down" is reported and if 120 pings give 0 results then email,
Now normally It would be safe to assume after 120pings and no responce, connectivity is lost to that router and this would
show up in the logs - wrong no entry in logs?
:if ([/ping 10.XXX.0.X  interval=2 count=60] =0) do={/tool e-mail send server=................................
Then I thought about the manner of how my script was running so i decided to edit scipt and try 10 pings, two seconds apart and get total
and if 0 then email, I will know in a day or so if I have stopped the false alarms.
:if ([/ping 10.XXX.0.X count=10 size=64 interval=2s ] =0) do={/tool e-mail send server=.............................

Who is online

Users browsing this forum: GoogleOther [Bot] and 24 guests