Community discussions

MikroTik App
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Topic Author
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

OID/Tools question

Wed Jun 08, 2011 1:01 am

Does anyone have any suggestions for how to make this happen:

Device 192.168.254.16 is being polled via a Dude agent with a public IP (say, 1.2.3.4)
Is there an OID to pull the IP of the polling agent, and then a function to convert the device IP's 4th octet into a 3-digit string to build a URL for the "Browse" tool?

So the "Browse" tool for this device should go to http://1.2.3.4:18016/

Device 192.168.254.17 would be http://1.2.3.4:18017/
Device 192.168.254.9 would be http://1.2.3.4:18009/
etc...

I'm sure a function could pull the Device.Firstaddress() for the pinhole number - but I can't find any OID to pull the agent's IP address.
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: OID/Tools question

Wed Jun 08, 2011 10:18 am

Hello.
Do not make it to complex. Yes it is possible to write many functions and so on.....
But, in your case the solution should be
new_type.png
device_settings.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Topic Author
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: OID/Tools question

Thu Jun 09, 2011 2:31 am

Thanks for the suggestion. I made a slight modification to your suggestion, and simply made another tool which browses to http://[Device.CustomField1]/ for now.

The thing is - we have hundreds and hundreds of devices, and I would like to avoid having to manually populate CustomField1 with this info every time a device is added.

Is there an OID that returns the IP of the Agent that is responsible for a device? My goal is to have as much of the features be added automatically as possible, given the devices are properly configured out in the field.
When given a spoon,
you should not cling to your fork.
The soup will get cold.

Who is online

Users browsing this forum: No registered users and 5 guests