Community discussions

MikroTik App
 
totalnett
newbie
Topic Author
Posts: 25
Joined: Fri Sep 23, 2005 9:48 am

Datasource - Function value

Fri Mar 04, 2011 1:30 pm

Hi,

have a regular function to get the signal from a device.

oid("1.3.6.1.4.1.119.2.3.69.401.8.1.1.5.1")
This returns a value example like this -50.1

How do i remove the decimal and the . so the value will be -50 ?

I need this to compere the signal with integer value. :)
 
totalnett
newbie
Topic Author
Posts: 25
Joined: Fri Sep 23, 2005 9:48 am

Re: Datasource - Function value

Fri Mar 04, 2011 4:39 pm

Hi,

have a regular function to get the signal from a device.

oid("1.3.6.1.4.1.119.2.3.69.401.8.1.1.5.1")
This returns a value example like this -50.1

How do i remove the decimal and the . so the value will be -50 ?

I need this to compere the signal with integer value. :)

Didn't find any way to do this so made a workaround....

Probe -----

Name:
signal check 1

Type:
Function

Available:
if(oid("iso.org.dod.internet.private.enterprises.nec.nec-mib.necProductDepend.radioEquipment.401.8.1.1.5.1")>0,1, -1)

Error:
if(oid("iso.org.dod.internet.private.enterprises.nec.nec-mib.necProductDepend.radioEquipment.401.8.1.1.5.1")*10>-700, "", "Signal under -70")

Value:
iso.org.dod.internet.private.enterprises.nec.nec-mib.necProductDepend.radioEquipment.401.8.1.1.5.1

Unit:



This will give notification if signal go below -70 db :D
 
User avatar
blackpaw
newbie
Posts: 37
Joined: Thu Jan 28, 2010 7:19 pm
Location: Amsterdam, NL

Re: Datasource - Function value

Fri Apr 01, 2011 5:16 pm

heyo

If you go in the Dude to menu "functions" and read the descriptions a bit you can find some that are useful, like:
- round
then your function will be:
round(oid("1.3.6.1.4.1.119.2.3.69.401.8.1.1.5.1"))
success


Andreas

Who is online

Users browsing this forum: No registered users and 11 guests