Community discussions

 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Thu Feb 08, 2018 1:56 pm

Dear All/Admins,
I have been playing arround Netwatch quite a long time for my internal network monitoring. I have more than 100 devices are under monitoring with netwatch. Recently i have intigrated SMS and other online http URLs via fetch tool in up down script to post data on websites.

Scenario:
*At time when my primary swich get down or isolated the network than my 100 host which are configured in netwatch for monitoring also get down but only approx random 30 netwatch entries send the data to website and rest just don't send/push/execute web URL.
*Same scenario, when primary network switch restored, it only send approx 30 random entries for their up states to website.
*Same Scenario when my mikrotik gets restarted and back online, it sends approx 30 random entries up or down states to website.

Note: If i do disable and re-enable all netwatch entries in 25-25-25-25 batches selection manually than all my host properly updated, which clears that my scripts or configuration don't have any issues.

I have multiple mikrotiks with version from 6.41.1 to older firmware. whereas i have tested the same scenario and result is same.


Netwatch Scripts:
/tool fetch mode=http address=13.13.13.13 src-path="/sms.php?host=73&status=1&api_key=2121212121212" keep-result=no
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Thu Feb 08, 2018 4:20 pm

Can anyone help here? How i can achive 100% update here?
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Fri Feb 09, 2018 5:36 pm

Dear Development Team,
I just did longer testing on Cloud CHR and max 20 exact limiting for updates. on 6.41.1.

I just dont know inspite providing all information, no one from forum is turining up? Can somebody point me to the right direction to get query solved?

Would really appriciate.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8308
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 10:14 am

Please describe your problem to support@mikrotik.com
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 2:48 pm

Done!
I Have just sent an Email to support. Hope will get a resolution and response on it.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5806
Joined: Mon Jun 08, 2015 12:09 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 3:07 pm

There probably is a limitation on how many action scripts or how many tool fetch commands can run at the same time.
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 3:11 pm

fetch tool is a great feature of Mikrotik, since world is moving online than url bases feature would be more used for onlime intigrations day by day.

if such limitations are kept on it than must be revoked.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5806
Joined: Mon Jun 08, 2015 12:09 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 3:52 pm

I think 25 fetches running at the same time is not so bad.
You can use a different kind of monitoring, e.g. a script that is scheduled regularly and that sequentially pings all the hosts
and issues the /tool fetch commands. As each of them is then running to completion the issue will not occur.
Also, you may be able to code some cleverness into that,e.g. when the ping of the next router on the link fails, do not ping
all the hosts behind that. They will appear down anyway.
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 4:03 pm

Any particular script you suggest Here?
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 4:05 pm

Also to bring your notice that every time when mikrotik router get rebooted, while startup..it refresh the netwatch entries. Currently i have more than 100 entries which left behind for update and entire monitoing need to refresh in 25 batches.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5806
Joined: Mon Jun 08, 2015 12:09 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 4:24 pm

Netwatch simply isn't the right tool for this. It is OK for simple things like monitoring the default gateway or 2-3 servers.
It has a lot of other disadvantages, e.g. when it misses a single ping reply it will declare the host down, and the next time (e.g. after a minute)
it will be up again, causing 2 events and maybe some alert to your phone. Proper network monitoring would filter that.

Did you try Dude or another network monitoring tool like Nagios, Zabbix, etc?
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 4:39 pm

Dear Sir,
I would like to thank you! first for your constant interest in resolving issue here.

Here are two aspect:
1> the actual subject line issue -- (This is pure limitation from Mikrotik & needs to have some workarround or fix.)
2> Way of i am doing the monitoring.
For 2:
Just to bring your notice, that i have build-ed a new Cloud based Network monitoring tool call IPGovernor for Mikrotik Users Community. We been evaluating netwatch for a long time and came up with all posible scripting for false alers avoidation. Currently our cloud recive input from netwatch -- /tool fectch to call url of particular host. And accordingly change the state on cloud and also trigger notification to respective user who opted for Email/SMS. Also we added Parent child linking feature which help User to identify the exact network location of isolation, which helps to minimize downtime.
This tool also keeps a downtime tracking & logs.

Currently we are runing beta version. Please let me know if you need to take a look and recomend the troubleshooting here.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5806
Joined: Mon Jun 08, 2015 12:09 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 4:58 pm

It is probably right for such a tool to be limited to around 25 hosts.
When you want more, you would have to write software that acts as an agent on the monitored network and posts the findings to the cloud service you want to use.
That could be in the form of a script running on the MikroTik router that does the ping and it could collect all the status for a single ping round and send it
as one single post using /tool fetch (despite its name it can also post).
In fact you could write a script that uses /tool fetch to fetch a list of IP addresses, put that in an array variable, then regularly loops over this array to
ping the hosts, keep the status of the hosts in the array, and posts the entire array after the loop.
Due to other limitations in scripting that would likely limit you to about 250 hosts to monitor from a single list. But you could have multiple lists.
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 5:05 pm

Dear Sir,
My URL Script is below where and host= and Status= gets changed and updated to cloud. Request you to kindly assist me with ping script which you recommending here. Would really appreciate if you help here.
Server Up Url : /tool fetch mode=http address=13.127.132.98 src-path="/api/status.update.php?action=update_router_status&host=245&status=1&api_key=a207-0136-558d-4546" dst-path=/netwatch port=80 host=13.127.132.98

Server down Url: /tool fetch mode=http address=13.127.132.98 src-path="/api/status.update.php?action=update_router_status&host=245&status=0&api_key=a207-0136-558d-4546" dst-path=/netwatch port=80 host=13.127.132.98
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 5:43 pm

To brief you more
My Cloud URL
http://13.13.13.13/api/status.update.ph ... -0136-558d

Host=$ (This is numeric value will be assigned to each host
Status=0 or 1 (1=UP & 0=Down)

There will be additional parameters required to be catch up in script for average latency.
ms=

So the url would be like below:
http://13.13.13.13/api/status.update.ph ... -0136-558d

So,
Host=245 (id)
Status=1 (UP)
ms=20 (Latency is 20ms)

My IPAddress File
Name: ip.txt
Formate: IPAddress,HostidNumber

192.168.1.1,245
192.168.1.2,249
192.168.1.3,260
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Mon Feb 12, 2018 9:00 pm

Dear pe1chl (Forum Guru),
Kindly let me know if you need any further information on this to assist me. Thanks for your kind support pointing me to the more logical way forward.
 
pe1chl
Forum Guru
Forum Guru
Posts: 5806
Joined: Mon Jun 08, 2015 12:09 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Tue Feb 13, 2018 11:21 am

I am not going to write the script for you!
I only suggested how you can fix your problem, but it is your own project.
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Tue Feb 13, 2018 2:05 pm

I understand that but anyway, would you help to point me to some links or forum where i can achieve that?

Dear All,
Can i have some greate Mikrotik Guru here to assist me here?
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Fri Feb 16, 2018 4:20 pm

No Reply or response from Mikrotik Support till now :(
 
pe1chl
Forum Guru
Forum Guru
Posts: 5806
Joined: Mon Jun 08, 2015 12:09 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Fri Feb 16, 2018 4:59 pm

This is not something to be taken up by MikroTik Support...
You should hire a consultant, ask here or inform at your local distributor.
 
fibernet4u
newbie
Topic Author
Posts: 33
Joined: Sat Dec 03, 2016 12:44 pm

Re: 100% Confirmed Netwatch issue with fetch tool while execution in UP or Down Script

Fri Feb 16, 2018 5:47 pm

Dear,
i am trying to highlight the execution problem of fetch tool with netwatch not my project.

please read the trail again for highlighted issue. Hope this make sense which is related to router OS.

No offense and please don't feel offended here.

Who is online

Users browsing this forum: No registered users and 76 guests