Community discussions

MikroTik App
 
User avatar
Minollie
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 96
Joined: Tue Nov 14, 2006 4:45 pm
Location: Netherlands

How to use OID-value in CustomField

Fri Apr 29, 2011 1:34 pm

Hi all,

I want to know the following:

For ease of maintenance we would like to be able to list all our switches in the Device panel with lots of info about the switches....
There you see the Flag/Name/Address/Mac/Type and Maps listing of the devices.. There is an option to add CustomField 1/2/3 to that listing..
Now I would like to be able to paste the OID of the serialnumber of our switches (which is OID: 1.3.6.1.2.1.47.1.1.1.1.11.1) in CustomField 1.
I hoped the list with Devices, sorted to Type Switch and enabled with Customfield1 would now display something like:

SW-000-000-AA-01, 10.10.10.10, 00-11-22-33-44-55, Switch, Location01, Serial abcd0123

To accomplish this I entered the oid in the field of CustomField1 as following: [oid("1.3.6.1.2.1.47.1.1.1.1.11.1")] and I also tried it with oid("1.3.6.1.2.1.47.1.1.1.1.11.1")
But.. when I list my devices, add Customfield1 as column name it displays: [oid("1.3.6.1.2.1.47.1.1.1.1.11.1")] or oid("1.3.6.1.2.1.47.1.1.1.1.11.1") instead of the serial abcd0123 (or whatever).

So, by displaying the exact string in this field I can't accomplish what I want to..
It also doesn't work the way I want when I add this oid to the notes list, simply because that is also displayed as oid and not the returned value.

Anybody with good options/solutions or tips/tricks??

I'm currently trying this with Dude 3.6, I've got 4b3 also running and behaving badly too..

Thanks in advance for any help given. If it's not yet possible I would really like this to be added as feature in future releases.

Best regards,
Minollie
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: How to use OID-value in CustomField

Fri Apr 29, 2011 3:37 pm

Anybody with good options/solutions or tips/tricks??
I have solution, and this is not a trick :)
1_dev_prop.png
2_dev_label.png
Label code:
[Device.Name]
[oid(device_property("CustomField1"))]
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: How to use OID-value in CustomField

Sat Apr 30, 2011 5:34 am

Gsandul is great at the dude...
 
User avatar
Minollie
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 96
Joined: Tue Nov 14, 2006 4:45 pm
Location: Netherlands

Re: How to use OID-value in CustomField

Mon May 02, 2011 12:33 pm

Hi guys..,

Sorry to say so, but that's not what I want.. :(
Showing OID values within the labels is sort of an ease if you ask me..

The first screenshot shows the Device-settings of the switch I'm trying to get this info from.
I've nice and smooth added the OID in the CustomField1 including the normally used notation with the Dude (as in: preceeded with oid etc).

The second screenshot shows the Devices-panel which I was talking about, including the sorting properties I decided I want to have.
Here you can see that in the column of CustomField1 an OID is returned instead of it's value (what would have been the serial here..)

Yet this way of configuring doesn't return the wanted information as I hoped it would.
Am I doing something entirely wrong or am I doing things right but without the result I hoped for??

Please help.. (not begging yet though.. :))

Best regards,
Minollie
You do not have the required permissions to view the files attached to this post.