Community discussions

MikroTik App
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

rssi probe in v4.03 not working

Sat Oct 12, 2013 11:54 am

Hi

Can someone point me to a working RSSI probe example for v4.03.

I have read " Getting started with functions and probes", "quick guide to a good probe"

But to no avail, just cant get a working probe/function.

Through copying and modifying other examples, I have managed to get "low signal" displayed but inverted to actual.
And also "not available" plenty of times.

I have tried with zeros at the end of the oid, 2 methods to remove the negation, but no luck.

I have read that there is a subtle difference in the "available" pre-requisites in v4.03, something to do with -1 or 1 or 0..

And as far as the documentation goes, it seems vague in a few areas.

Lebowski, in the "Quick guide.....",, half way down the page you start to use, 10, 29 at the end of the oid... I have seen other examples of this (10,5) What is the significance of those values added into the end of the oid expression???

What is the difference between oid_raw and oid_column.

I have trawled the web, but cannot find any explanation at all.

I know someone is going to be willing to offer up an RSSI probe/function, but thats not the point..

I want to know what is different in 3.6 to 4.03 and the significance to those values added to the oid.
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

Re: rssi probe in v4.03 not working

Sat Oct 12, 2013 12:28 pm

Example from Lebowski:

Right so you will want to find the OID for MikroTik and replace the string in the function...

So the function does all the work; First the if in the function determines if the oid exists, if it does then it returns the value in the 2nd oid. Otherwise it returns false if the 1st oid does not exist. This allows the probe to determine if the values are in a range or completely unreadable on the error line and helps determine if the probe should be automatically installed on a device based on the available line when using auto discover. I believe 1.3.6.1.4.1.161.19.3.2.2.2.0 is the correct OID for MikroTik so your function could be
Function:
Name: w_rssi_MT
Code: if(oid_column("1.3.6.1.4.1.161.19.3.2.2.2", 10 ,5),oid("1.3.6.1.4.1.161.19.3.2.2.2.0", 10 ,5),"False")

Then your probe would be
Probe:
name: rssi1410
available: w_rssi_MT()<>"False"
error: if(w_rssi_MT()<>"False", if(w_rssi_MT() > -70,"", concatenate("Bridge Trouble = ", w_rssi_MT())) , "Can not read status of MikroTik bridge")
value: w_rssi_MT()
unit: dbm

If that is not the correct oid for rssi you can test oids by placing them on a device label. Use the device label first to make sure the numbers that display are accurate then build a probe based on your device label. You can do math on a device label as well.
RSSI: [oid("1.3.6.1.4.1.161.19.3.2.2.2.0")]
RSSI: [oid("1.3.6.1.4.1.161.19.3.2.2.2.0")*10]
RSSI: [oid("1.3.6.1.4.1.161.19.3.2.2.2.0")/10]
RSSI: [oid("1.3.6.1.4.1.161.19.3.2.2.2.0")+10]
RSSI: [oid("1.3.6.1.4.1.161.19.3.2.2.2.0")-10]

When you get some time read some of the probe thread but also look closely at this probe since it is the model of a well designed probe and all your probes in my opinion should be based on this design where a function determines if the value is available or not and the error line of the probe lets you know if the device is down or if the value is not in the correct range. The early stuff in the probe thread is not as sophisticated as the later stuff so you might want to just look to see what has been done...

HTH,
Lebowski


So in Function, I replaced his oid with......
if(oid_column("1.3.6.1.4.1.14988.1.1.1.1.1.4.3", 10 ,5),oid("1.3.6.1.4.1.14988.1.1.1.1.1.4.3", 10 ,5),"False")

and no need to change any config in the probe!!

However, all th eprobe displays is "Can not read status of MikroTik bridge"

Yet the oid placed on the label shows the correct RSSI
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

Re: rssi probe in v4.03 not working

Sat Oct 12, 2013 12:41 pm

ok..

I got it to work...

I changed line:

if(oid_column("1.3.6.1.4.1.14988.1.1.1.1.1.4.3", 10 ,5),oid("1.3.6.1.4.1.14988.1.1.1.1.1.4.3", 10 ,5),"False")

to:

if(oid_column("1.3.6.1.4.1.14988.1.1.1.1.1.4", 10 ,5),oid("1.3.6.1.4.1.14988.1.1.1.1.1.4.3", 10 ,5),"False")

Now, please tell me why?

Where have I missed the explanation of the need to drop the trailing digit in the oid?
 
wirelesswaves
Member
Member
Topic Author
Posts: 311
Joined: Thu May 31, 2007 12:38 am

Re: rssi probe in v4.03 not working

Sat Oct 12, 2013 1:03 pm

Wow, I managed to contribute and solve my own thread in its entirety!!

The answer is in the last paragraph:

"When you get some time read some of the probe thread but also look closely at this probe since it is the model of a well designed probe and all your probes in my opinion should be based on this design where a function determines if the value is available or not and the error line of the probe lets you know if the device is down or if the value is not in the correct range. The early stuff in the probe thread is not as sophisticated as the later stuff so you might want to just look to see what has been done..."

Must get new glasses!!

Who is online

Users browsing this forum: OptiTech and 19 guests