Devices taking time to show its interfaces in opennms

Hi Team,

We have juniper devices (BNG) where we have thousands of interfaces and it is taking time (couple of days and sometime it doesnt show) to show in opennms post discovery.

NOC_jun@sbr-ras-bng-tbv-01> show interfaces terse | except demux | except pp0 | count
Count: 2297 lines

{master}
NOC_jun@sbr-ras-bng-tbv-01> show interfaces terse | count
Count: 20731 lines

In order to narrow down, I want something where we can exclude some of the interface types so here I do not want to see ‘demux’ and ‘pp0’ interfaces in opennms.

Can we do this?

-PL

The discovery can take some time, but that does seem fairly long.

As for excluding interfaces, you can add a policy to your requisition.

<policy class="org.opennms.netmgt.provision.persist.policies.MatchingSnmpInterfacePolicy" name="EnableCollection">
       <parameter value="ENABLE_COLLECTION" key="action"/>
       <parameter value="ALL_PARAMETERS" key="matchBehavior"/>
       <parameter value="~(^Fa.*|^Gi.*|^Vl.*)" key="ifName"/>
       <parameter value="1" key="ifAdminStatus"/>
</policy>

https://wiki.opennms.org/wiki/Provisiond#Enable_data_collection_only_for_active_SNMP_interfaces_whose_name_matches_a_certain_pattern

Thank for the information but is it for data collection or to disable interfaces from discovery?

And which we need to edit for this policy?

For data collection. You can’t disable interfaces from discovery (AFAIK)

This would go into the requisition (foreign source definition) where you have your nodes provisioned.

Is there any xml file where we can add this policy?

It would be the XML file for your requisition, in the $OPENNMS_HOME/etc/foreign-sources folder, or the default-foreign-source.xml if using the default requisition.

Thank you for your response, mmahacek!
I will check and get back to you.

If any of this helps, you can mark a reply as a solution.

Hi mmahacek,

I want opennms not to save “xe-*” interfaces in opennms DB so i have add below policy in /foreign-sources/space.xml file:

   <policies>
      <policy name="reject6" class="org.opennms.netmgt.provision.persist.policies.MatchingIpInterfacePolicy">
         <parameter key="action" value="DO_NOT_PERSIST"/>
         <parameter key="matchBehavior" value="ALL_PARAMETERS"/>
         <parameter key="ifName" value="~(^xe-*|^lo*)"/>
      </policy>
   </policies>

image

But I am able to see these interfaces after discovery.
Any idea?

forgot to mention opennms version which is quiet old i.e. 1.13.1

You should look at upgrading, but there isn’t a way to exclude from discovery. The do not persist will not save metrics for those interfaces.

Any idea why we are not able to any of the interfaces for some of the devices/nodes?
Snmp configuration is correct. Moreover it takes 2-3 days to show interfaces

I would need to defer that to someone else to answer.

How many IP addresses are assigned to these over 2000 interfaces and are they discovered as well?

Ip addresses are assigned to only few interfaces, maybe just 30 and didnt get discovered in opennms.
There are thousands of logical interfaces without ip