Community discussions

MikroTik App
 
rmichael
Forum Veteran
Forum Veteran
Topic Author
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Simple probe question

Fri Oct 08, 2010 10:41 pm

Where do I do to set how many good probe tests it takes to change state from down to up?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Simple probe question

Fri Oct 08, 2010 10:58 pm

On the polling tab, check the settings of each area, one for global, one for each map and one for each device...
polling.png
You do not have the required permissions to view the files attached to this post.
 
rmichael
Forum Veteran
Forum Veteran
Topic Author
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: Simple probe question

Sat Oct 09, 2010 12:43 am

So, is probe down count value used for probe up count also?

That does not seem to be the case because up status sometimes takes minutes when system was only down 15 seconds or so (my settings are 10s, 5s, 1) and running v3.6 (v4 did not work well for me on W7 64bit)

EDIT: here's an example, the lines came up 15 seconds later but up status did not until 5 minutes later:
DownToUp.png
You do not have the required permissions to view the files attached to this post.
 
rmichael
Forum Veteran
Forum Veteran
Topic Author
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: Simple probe question [solved]

Sun Oct 10, 2010 10:32 pm

...my problem was due to negative cache:

http://wiki.mikrotik.com/wiki/Getting_s ... and_probes
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Simple probe question

Mon Oct 11, 2010 8:37 pm

Yeah, finally someone with the same problem as me :) BTW I wrote that...
 
rmichael
Forum Veteran
Forum Veteran
Topic Author
Posts: 718
Joined: Sun Mar 08, 2009 11:00 pm

Re: Simple probe question

Tue Oct 12, 2010 12:22 pm

Yeah, finally someone with the same problem as me :) BTW I wrote that...
Yeah, thanks for that! Franky, if not for people like you Dude's idiosyncrasies would make me give up a long time ago :)
 
maclay
just joined
Posts: 3
Joined: Mon Oct 11, 2010 3:31 am
Location: taiwan

Re: Simple probe question

Thu Oct 14, 2010 5:02 am

Hi guys

I got the same problem too, and would like to get some help about this. :oops:
Since I have lots of router to monitor, each router have to monitor different interface.
I create several probe to match each interface, each probe use a matching function.
ex.
function
<?xml version="1.0" ?>
<dude version="4.0beta2">
<Function>
<sys-type>57</sys-type>
<sys-id>557421</sys-id>
<sys-name>IntChk_Serial0</sys-name>
<code>oid_raw(concatenate("1.3.6.1.2.1.2.2.1.8.",array_element(oid_column("1.3.6.1.2.1.2.2.1.1"),array_find(oid_column("1.3.6.1.2.1.2.2.1.2"),"Serial0"))))</code>
</Function>
</dude>

probe
<?xml version="1.0" ?>
<dude version="4.0beta2">
<Probe>
<sys-type>13</sys-type>
<sys-id>557437</sys-id>
<sys-name>Serial0</sys-name>
<typeID>8</typeID>
<functionError>if(IntChk_Serial0()=1, "", "down")</functionError>
</Probe>
</dude>

So, seem negative cache time cause a probe down for about 5 mins down time.
I tried to modify my founction below
<?xml version="1.0" ?>
<dude version="4.0beta2">
<Function>
<sys-type>57</sys-type>
<sys-id>557421</sys-id>
<sys-name>IntChk_Serial0</sys-name>
<code>oid_raw(concatenate("1.3.6.1.2.1.2.2.1.8.",array_element(oid_column("1.3.6.1.2.1.2.2.1.1"),array_find(oid_column("1.3.6.1.2.1.2.2.1.2"),"Serial0"))),3,3)</code>
</Function>
</dude>

But it seems not working, probe still show down status for nearly 5 mins @@"
Can any one give some ideas about this? :oops:
Thanks a lot~!!
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: Simple probe question

Thu Oct 14, 2010 10:38 am

But it seems not working, probe still show down status for nearly 5 mins @@"
Can any one give some ideas about this?
Your function is snmpwalking 2 times and snmpgetting 1 time. Am I right?
And you change default "negative cache" only for snmpget oid_raw.
You should try to change "negative cache" also for both oid_column funtions, and check wats up.

As I can see, you had modified mem_size funtion which comming with defauld The Dude distribution.

I found that mem_size and your functions are not optimal.
This code
oid_raw(concatenate("1.3.6.1.2.1.2.2.1.8.",array_element(oid_column("1.3.6.1.2.1.2.2.1.1"),array_find(oid_column("1.3.6.1.2.1.2.2.1.2"),"Serial0"))))
can be replaced with more clear (at least I think it's more clear)
array_element(oid_column_raw("1.3.6.1.2.1.2.2.1.8"),array_find(oid_column("1.3.6.1.2.1.2.2.1.2"),"Serial0"))
and you should also change the code for your need of "negative cache"
array_element(oid_column_raw("1.3.6.1.2.1.2.2.1.8",3,3),array_find(oid_column("1.3.6.1.2.1.2.2.1.2",3,3),"Serial0"))
As for me, I did never use "negative cache" or "positive cache" because of no need. :D
 
maclay
just joined
Posts: 3
Joined: Mon Oct 11, 2010 3:31 am
Location: taiwan

Re: Simple probe question

Thu Oct 14, 2010 2:49 pm

Your function is snmpwalking 2 times and snmpgetting 1 time. Am I right?
And you change default "negative cache" only for snmpget oid_raw.
You should try to change "negative cache" also for both oid_column funtions, and check wats up.
Yeap, that's what I do for try to make sure which interface I am looking for. :D
As I can see, you had modified mem_size funtion which comming with defauld The Dude distribution.
I found that mem_size and your functions are not optimal.
This code
oid_raw(concatenate("1.3.6.1.2.1.2.2.1.8.",array_element(oid_column("1.3.6.1.2.1.2.2.1.1"),array_find(oid_column("1.3.6.1.2.1.2.2.1.2"),"Serial0"))))
can be replaced with more clear (at least I think it's more clear)
array_element(oid_column_raw("1.3.6.1.2.1.2.2.1.8"),array_find(oid_column("1.3.6.1.2.1.2.2.1.2"),"Serial0"))
well...I wrote this function myself without reference any function in dude..
seems I think too much on how to get interface index and use it to get Interface Oper Sataus @@"
and you should also change the code for your need of "negative cache"
array_element(oid_column_raw("1.3.6.1.2.1.2.2.1.8",3,3),array_find(oid_column("1.3.6.1.2.1.2.2.1.2",3,3),"Serial0"))
As for me, I did never use "negative cache" or "positive cache" because of no need. :D
Is that means I can set the cache value to 0?
basically, I don't want the cache too :P

Really thanks for your help~!!
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: Simple probe question

Thu Oct 14, 2010 3:38 pm

Is that means I can set the cache value to 0?
No, I mean defaults are ok for me. But you can try to set it to 0 and see the result.
well...I wrote this function myself without reference any function in dude..
Good job - it's not trivial to write such a functions....
seems I think too much on how to get interface index and use it to get Interface Oper Sataus @@
It seems someone from Mikrotik staff was thinking in the same way. :D
But I was thinking on generic snmp table and how to match the same row index number in different table columns. :lol: