Community discussions

MikroTik App
 
jmay
Member
Member
Topic Author
Posts: 336
Joined: Tue Jun 23, 2009 8:26 pm

Display OID's from multiple devices in 1 Map Entry?

Thu Dec 16, 2010 7:14 pm

Is this possible? I'd like to total all the dhcp leases from various routers and show them in 1 device.
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: Display OID's from multiple devices in 1 Map Entry?

Fri Dec 17, 2010 11:54 am

Is this possible? I'd like to total all the dhcp leases from various routers and show them in 1 device.
Yes, it is possible.
Check oid function definition

oid
returns value of given snmp OID. Only first parameter mandatory. First parameter - oid string, second - cache time - default 5 seconds (5.0), third - negative cache time - default 5 minutes (300.0), forth - ip address (overrides context device), fifth - snmp profile (overrides context device)

For a sample
[oid("1.3.6.1.4.1.9.10.19.1.1.4.0","5","300","192.168.15.5","Cisco")]
Will show the number of active calls on cisco AS with IP 192.168.15.5 on any device label.
 
jmay
Member
Member
Topic Author
Posts: 336
Joined: Tue Jun 23, 2009 8:26 pm

Re: Display OID's from multiple devices in 1 Map Entry?

Fri Dec 17, 2010 6:21 pm

Is this possible? I'd like to total all the dhcp leases from various routers and show them in 1 device.
Yes, it is possible.
Check oid function definition

oid
returns value of given snmp OID. Only first parameter mandatory. First parameter - oid string, second - cache time - default 5 seconds (5.0), third - negative cache time - default 5 minutes (300.0), forth - ip address (overrides context device), fifth - snmp profile (overrides context device)

For a sample
[oid("1.3.6.1.4.1.9.10.19.1.1.4.0","5","300","192.168.15.5","Cisco")]
Will show the number of active calls on cisco AS with IP 192.168.15.5 on any device label.

Awesome thank you! For anybody that finds this you also have to change your default SNMP to the device you are trying to do this for, unless there is a way to add the SNMP profile in the OID? For me it doens't matter as changing the default is ok in my situation. Heres how I made it work in case someone from the future needs to know.

[oid("1.3.6.1.4.1.14988.1.1.6.1.0",5,300,"10.101.0.1")+oid("1.3.6.1.4.1.14988.1.1.6.1.0",5,300,"10.102.0.1")+oid("1.3.6.1.4.1.14988.1.1.6.1.0",5,300,"10.103.0.1")+oid("1.3.6.1.4.1.14988.1.1.6.1.0",5,300,"10.107.0.1")+oid("1.3.6.1.4.1.14988.1.1.6.1.0",5,300,"10.108.0.1")]