Community discussions

MikroTik App
 
User avatar
CyB3RMX
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Thu May 26, 2011 7:08 am

Netwatch probe.

Wed Oct 29, 2014 7:25 pm

Hello,

Im don't consider myself as an advanced Dude User, but i have made some test without success. I hope you guys can help me:

I have a router connected to 8 DSL services, I'am using netwatch and a route to a specific host so i can ping over each DSL, and email ifdown to check if they are up or down.

Works fine, but i would like to monitor this Netwatch status in the dude, So if its up goes green and if it goes down, in red and play that gong! hehe..

Thanks for your help.

JB.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Netwatch probe.

Thu Oct 30, 2014 7:11 pm

Is netwatch an executable? Is it running on a windows computer? If so enable snmp, make a function, make a probe.
Put the correct name of the exe in the function

Function;
Name: find_netwatch
if(array_size(oid_column("1.3.6.1.2.1.25.4.2.1.2",10,0)), array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2",10,0),"netwatch.exe"),"False")

Probe;
Name: Netwatch
Available: find_netwatch()<>"False"
Error:if(find_netwatch()<>"False",if(find_netwatch()<>-1, "", "Warning: Netwatch is not running"), "Failed to read running programs is the computer down?")

HTH,
Lebowski
 
User avatar
CyB3RMX
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Thu May 26, 2011 7:08 am

Re: Netwatch probe.

Thu Apr 30, 2015 8:02 pm

Sorry for the late reply,
No, im using the /Tool -> Netwatch option on the router.

Im using several WAN on the router, so i need to be able to see if one of them fails, right now i made a script that send me an Email and alert me, but i think its more practical to see it on the Dude, i have a Dedicated server with a TV pluged on it to see all my network status,and i have everything but this.

Hope i made my self clear, sorry about my english.

Have a great day and Thanks for your support.:)

JB.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Fri May 01, 2015 4:19 am

Just put there a device with ip you are using as netwatch check.
 
User avatar
CyB3RMX
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Thu May 26, 2011 7:08 am

Re: Netwatch probe.

Wed May 13, 2015 7:35 am

That wont do the job..

I have it this way...
example.jpg
The router its a RB493AH and there i have enabled Netwatch (/system netwatch), i do even have a script that sends me an email when one of the WAN are flapping or goes down or back on and change the mangle rules to avoid interruptions, but what i need to make its a probe in the Dude to check the status of the Netwatch on the ros router and let know like the rest of the devices if its up or down.
Making it the way you suggest will only tell me if the vDSL modem its up or no, and in 95% of the scenarios when the link goes down, its not in the LAN side of the vDSL, its on the WAN side, so with what i want to do i will be able to see if the vDSL modem has internet on it.

Thanks :)

JB
You do not have the required permissions to view the files attached to this post.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Netwatch probe.

Thu May 14, 2015 5:34 pm

I didn't understand the first post, sorry.

If your router should populate an SNMP value. You could snmpwalk the dude and find the status then build a probe.
 
User avatar
CyB3RMX
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Thu May 26, 2011 7:08 am

Re: Netwatch probe.

Sat May 30, 2015 9:55 am

No problem ! Thanks :)
I dont think that rOS have an OID for the Netwatch.

if i do this:
/tool netwa print oid
expected end of command (line 1 column 19)
Just send and error, not the same as
/int wire print oid

0 tx-rate=.1.3.6.1.4.1.14988.1.1.1.3.1.2.1 
   rx-rate=.1.3.6.1.4.1.14988.1.1.1.3.1.3.1 
   ssid=.1.3.6.1.4.1.14988.1.1.1.3.1.4.1 bssid=.1.3.6.1.4.1.14988.1.1.1.3.1.5.1 
   client-count=.1.3.6.1.4.1.14988.1.1.1.3.1.6.1 
   frequency=.1.3.6.1.4.1.14988.1.1.1.3.1.7.1 
   band=.1.3.6.1.4.1.14988.1.1.1.3.1.8.1 
   noise-floor=.1.3.6.1.4.1.14988.1.1.1.3.1.9.1 
   overall-ccq=.1.3.6.1.4.1.14988.1.1.1.3.1.10.1 
 
User avatar
ploquets
Member Candidate
Member Candidate
Posts: 162
Joined: Tue Nov 17, 2015 12:49 pm
Location: Uruguaiana, RS, Brazil
Contact:

Re: Netwatch probe.

Sat Nov 28, 2015 11:53 pm

Hello!

I was searching about something like that...

What I want to is:

Monitor some external IP to see if everything is working OK [ I guess that I can create that by using netwatch]

If I can't ping, send some kind of snmp trap to the dude server,so I can know that is a problem on that router.


That is because I'm used to work with only ping probe, but sometimes I can ping the router but the router has no connectivity to the external internet...

Is that possible?

Thanks!
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Netwatch probe.

Mon Nov 30, 2015 9:23 pm

The dude doesn't handle snmp traps. Is it a static route on the router or are you using a routing protocol? If you are using a routing protocol you might be able to determine the gateway of last resort or the next hop address and if it changes you could send an alert. I was working on a slightly different thing that would let me know when the learned default route changed but it is very early in it's design. it is cisco and eigrp...

Who is online

Users browsing this forum: No registered users and 41 guests