Forum Discussion

Vitor_Santos's avatar
5 years ago

Get the interface IP on the actual Interfaces datasource?

Hello,

We were wondering if it would be possible to map the actual IP against the discovered interface(s)? - I'm referring specifically to the 'snmp64_If-' & 'snmpIf-' datasources

Our goal is to be able to add deviceA (that contains 5 interfaces for example) & quickly determine which IP is assigned to each interface (I know we can always check the configuration but, it's not that productive).
I also noticed that the device itself contains the 'system.ips' property but, we don't know which IP belongs to each interface.

Appreciate the feedback.

Regards,

  • 2 minutes ago, Stuart Weenig said:

    Hm, appears to not yet be released. It's been in the works for a while since it's the most heavily utilized datasource since it works for pretty much all device types. You could either give it time, or write your own.  I attempted something like this with this: https://github.com/sweenig/monitoring-recipes/blob/master/DataSources/Groovy/SNMP/Examples/ActiveDiscovery_with_properties_with_enumeration.groovy, but it's not scalable to very large devices. After about 200 interfaces it starts to timeout pretty bad. 

    Hmm... yeah  probably we'll just wait for something official.
    However, thanks again for the sharing. I'll poke on it once I've some free time 

    Regards,

  • Anonymous's avatar
    Anonymous

    Hm, appears to not yet be released. It's been in the works for a while since it's the most heavily utilized datasource since it works for pretty much all device types. You could either give it time, or write your own.  I attempted something like this with this: https://github.com/sweenig/monitoring-recipes/blob/master/DataSources/Groovy/SNMP/Examples/ActiveDiscovery_with_properties_with_enumeration.groovy, but it's not scalable to very large devices. After about 200 interfaces it starts to timeout pretty bad. 

  • Anonymous's avatar
    Anonymous

    Yeah, both those tables have their own index, which is not the ifIndex. However, the ifIndex is in both tables so you should be able to use it. You'd have to go to a scripted version of the DS though. If i recall, there is a new scripted interfaces DS out on the exchange, which might already do this or be customized to add it.

  • 2 minutes ago, Stuart Weenig said:

    Should be doable by fetching the IP address table from the ipAddressEntry table at 1.3.6.1.2.1.4.34.1, however most of the test polls i did on my lab devices didn't have anything in those tables.  Do you know where you could fetch the IP addresses from?

    Thanks for the reply Stuart.

    I tried that one as well with no luck.
    Instead, we can retrieve it using '1.3.6.1.2.1.4.20.1' OID (doing a walk).

    http://oid-info.com/get/1.3.6.1.2.1.4.20.1 - quick explanation over the different OIDs

    The problem I faced is that it doesn't use the actual interface index (as used on the other OIDs - within the interfaces datasource)

  • Anonymous's avatar
    Anonymous

    Should be doable by fetching the IP address table from the ipAddressEntry table at 1.3.6.1.2.1.4.34.1, however most of the test polls i did on my lab devices didn't have anything in those tables.  Do you know where you could fetch the IP addresses from?