Standard discovery job produces a lot of bogus interface on JunOS #1878

Closed
bartdebruijn opened this Issue Sep 11, 2015 · 7 comments

Comments

Projects
None yet
7 participants
@bartdebruijn
Contributor

bartdebruijn commented Sep 11, 2015

On JunOS, a lot of interfaces are created by default when you enable a service. A lot of these can't be configured and show empty graphs. There are a LOT of these, so it's worth it to filter them and prevent them from being polled and graphed.

Here's a list of bad_if_regexp matches that will cut down on the number of bogus interfaces, you can consult http://www.juniper.net/documentation/en_US/junos15.1/topics/concept/interfaces-interface-naming-overview.html for more information. not all of the interface types are listed though.

#Get rid of bogus JunOS interfaces, most of these are unconfigurable
$config['bad_if_regexp'][] = '/^fxp[0-9]/';     // management interface
$config['bad_if_regexp'][] = '/^cbp[0-9]/';     // no idea
$config['bad_if_regexp'][] = '/^dsc/';          // discard interface
$config['bad_if_regexp'][] = '/^lo[0-9].*/';    // loopback
$config['bad_if_regexp'][] = '/^tap/';          // multicast tunnel
$config['bad_if_regexp'][] = '/^gre/';          // gre interfaces
$config['bad_if_regexp'][] = '/^ipip/';         // ip-in-ip interfaces
$config['bad_if_regexp'][] = '/^pim[a-z]/';     // multicast
$config['bad_if_regexp'][] = '/^mtun/';         // multicast tunnel
$config['bad_if_regexp'][] = '/^em[0-9].*/';    // ethernet management interface
$config['bad_if_regexp'][] = '/^cpb[0-9]/';     // collector interface
$config['bad_if_regexp'][] = '/^demux[0-9]/';   // demux interface
$config['bad_if_regexp'][] = '/^irb/';          // routing and bridging interface
$config['bad_if_regexp'][] = '/^pip[0-9]/';     // no idea
$config['bad_if_regexp'][] = '/^pp[0-9]/';      // no idea
$config['bad_if_regexp'][] = '/^.*\.[0-9]{5}/'; // auto generated interfaces, e.g. pfd-0/0/0.32567
$config['bad_if_regexp'][] = '/^lc.*/';         // local interface
$config['bad_if_regexp'][] = '/^lsi.*/';        // Internally generated interface
$config['bad_if_regexp'][] = '/^pf[a-z].*/';    // no idea

@bartdebruijn bartdebruijn changed the title from Standard discory job produces a lot of bogus interface on JunOS to Standard discovery job produces a lot of bogus interface on JunOS Sep 11, 2015

@pjchilds1975

This comment has been minimized.

Show comment
Hide comment
@pjchilds1975

pjchilds1975 Sep 15, 2015

For what it is worth previously we have used a standard filter on our junos devices to suppress bogus interfaces from all snmp queries/walks such as


> show configuration snmp
filter-interfaces {
    interfaces {
        cbp0;
        demux0;
        gre0;
        tap;
        gre;
        ipip;
        pime;
        pimd;
        mtun;
        pip0;
        dsc;
        irb;
        pp0;
        lsi;
        gr-*;
        ip-*;
        lt-*;
        mt-*;
        pe-*;
        pfe-*;
        pfh-*;
        ut-*;
        vt-*;
        ".*\.32767";
        ".*\.16384";
        pd-*;
        lc-*;
    }
    all-internal-interfaces;
}

For what it is worth previously we have used a standard filter on our junos devices to suppress bogus interfaces from all snmp queries/walks such as


> show configuration snmp
filter-interfaces {
    interfaces {
        cbp0;
        demux0;
        gre0;
        tap;
        gre;
        ipip;
        pime;
        pimd;
        mtun;
        pip0;
        dsc;
        irb;
        pp0;
        lsi;
        gr-*;
        ip-*;
        lt-*;
        mt-*;
        pe-*;
        pfe-*;
        pfh-*;
        ut-*;
        vt-*;
        ".*\.32767";
        ".*\.16384";
        pd-*;
        lc-*;
    }
    all-internal-interfaces;
}
@Tatermen

This comment has been minimized.

Show comment
Hide comment
@Tatermen

Tatermen Sep 18, 2015

Contributor

Also:

$config['bad_if_regexp'][] = '/^vme.*/';        // Virtual Chassis management interface
$config['bad_if_regexp'][] = '/^bme.*/';        // Virtual Chassis management interface
$config['bad_if_regexp'][] = '/^jsrv.*/';        // Internal sFlow collector
Contributor

Tatermen commented Sep 18, 2015

Also:

$config['bad_if_regexp'][] = '/^vme.*/';        // Virtual Chassis management interface
$config['bad_if_regexp'][] = '/^bme.*/';        // Virtual Chassis management interface
$config['bad_if_regexp'][] = '/^jsrv.*/';        // Internal sFlow collector
@Rosiak

This comment has been minimized.

Show comment
Hide comment
@Rosiak

Rosiak Jun 22, 2016

Contributor

@librenms/reviewers Should we close this?

Contributor

Rosiak commented Jun 22, 2016

@librenms/reviewers Should we close this?

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jun 24, 2016

Member

We should either add them as defaults or provide docs on doing so.

Member

laf commented Jun 24, 2016

We should either add them as defaults or provide docs on doing so.

@Rosiak

This comment has been minimized.

Show comment
Hide comment
@Rosiak

Rosiak Jun 24, 2016

Contributor

I'll deal with the docs.

Contributor

Rosiak commented Jun 24, 2016

I'll deal with the docs.

@Rosiak Rosiak self-assigned this Jun 24, 2016

@thefallentree

This comment has been minimized.

Show comment
Hide comment
@thefallentree

thefallentree Jan 21, 2017

any progress on this?

any progress on this?

@Rosiak Rosiak removed their assignment Feb 2, 2017

laf added a commit to laf/librenms that referenced this issue Feb 7, 2017

@laf laf referenced this issue Feb 7, 2017

Merged

doc: Updated example for using bad_if_regexp #1878 #5825

2 of 2 tasks complete

@laf laf closed this in #5825 Feb 8, 2017

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@librenms librenms locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.