Community discussions

MikroTik App
 
marcopolo
newbie
Topic Author
Posts: 45
Joined: Wed Feb 03, 2010 7:17 pm

Discovery

Wed Feb 24, 2010 11:02 am

I've set the discovery not to use certain services but these are still being assigned.

Any ideas?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Discovery

Wed Feb 24, 2010 5:11 pm

I found that some probes I created where I put the OID directly in the available line it would add that probe to every device even though I told it not to.

You can either change the OID in the Available field, remove the last 0.
insted of oid(1.3.6.x.x.x.x.0)
use oid(1.3.6.x.x.x.x)

Or create a function for the available field that checks to see if OID exists.
Function name "Cisco_CPU_Available"
Function: array_size(oid_column("1.3.6.1.4.1.9.2.1.57", 10, 29))

Available: Cisco_CPU_Available()
Error if x, "", "error"
value: oid("1.3.6.1.4.1.9.2.1.57.0") Notice that I am graphing the value but In the Available line I am checking to see if the OID exists not the value that would be returned.

So I think that Available is not able to read the "Value" but is able to check that the OID is actually there, sounds like that is what it is supposed to do, BUT is it a bug that if you specify the "OID.Value" on the Available line it always returns as true.

Anyhow I have had situations that I could not get things to graph correctly until I used a function for the available line. Maybe I didn't know clearly what was going on or I did something differently or just was confused and built my probe wrong. :)

HTH,
Lebowski
 
marcopolo
newbie
Topic Author
Posts: 45
Joined: Wed Feb 03, 2010 7:17 pm

Re: Discovery

Wed Feb 24, 2010 6:13 pm

My available line equates to this, which are Hard Disk 'Drive' letters refering to disk numbers.

if((((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024)>0, 1, -1)

So you're saying remove the '2'

Regards

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

Re: Discovery

Wed Feb 24, 2010 7:37 pm

Available is only to detect if the OID exists... I am not certain what is happening in this case.
I suspect doing all that extra work on the available line is confusing the check to see if the OID exists. Available doesn't need to be an if statement.

You can simplify your available line and do all the complex stuff on the error and value entries.
If you only put oid("1.3.6.1.2.1.25.2.3.1.5.2") on the available line it should still be accurate since devices that just don't have that OID wont return true. If that still causes the probe to be installed on devices that don't contain that OID you can try dropping the 2.

Also -1 at the end doesn't resolve to false... UGG
if((((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024)>0, 1, -1)
If I was going to try to use an if in the available line I would change it to something more like this...
if((((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024)>"", 1, 0)

I know -1 should be false but you will find in the probe thread that I spent quite a bit of time trying to tune the cisco_cpu probe and I finally have a probe that is very accurate with no false positives.

I hope I am not confusing things, I am really just trying to help so bear with me. :)
Here is a couple screen shots of the cisco cpu function and probe that I use for a model for all my other probes.
cpu_avail.PNG
cpu_probe.PNG
That might clear things up a little bit.
You do not have the required permissions to view the files attached to this post.
 
novelty22
Frequent Visitor
Frequent Visitor
Posts: 64
Joined: Fri Feb 12, 2010 1:57 pm

Re: Discovery

Thu Feb 25, 2010 5:38 pm

I could never get this to work as "intended" (or how I believe it was intended rather)....

I found out manually adding the services was much less hassle.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Discovery

Fri Feb 26, 2010 3:50 pm

Yeah I didn't like the way auto discover adds services either but if you go into each individual Device Type To Discover you will find that each device also has it's own list of services to discover besides the services on the Discover tab in settings.

Who is online

Users browsing this forum: No registered users and 17 guests