Junos OS

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  MX - SNMP filter-interface - only Get physical interfaces

    Posted 09-06-2019 04:20

    I'm trying to push back the used WCPU % by restricting my monitoring server polling physical interfaces only.

    So I'm trying to leave out the logical subinterfaces (units) by below config, except that it neither polls the physical and unit interfaces:

     

    beeelze@ams-nik-er3# show snmp 
    filter-interfaces {
        interfaces {
            pp0;
            demux0;
            ge-1/1/0.*;
            ge-1/1/1.*;
            ge-1/1/2.*;
            ge-1/1/3.*;
            ge-1/1/4.*;
            ge-1/1/5.*;
            ge-1/1/6.*;
            ge-1/1/7.*;
            ge-1/1/8.*;
            ge-1/1/9.*;
            ge-1/0/0.*;
            ge-1/0/1.*;
            ge-1/0/2.*;
            ge-1/0/3.*;
            ge-1/0/4.*;
            ge-1/0/5.*;
            ge-1/0/6.*;
            ge-1/0/7.*;
            ge-1/0/8.*;
            ge-1/0/9.*;
            xe-0/0/0.*;
            xe-0/0/1.*;
            xe-0/0/2.*;
            xe-0/0/3.*;
            xe-1/2/0.*;
            xe-1/3/0.*;
        }
    }
    

    How would I accomplish what I want?



  • 2.  RE: MX - SNMP filter-interface - only Get physical interfaces

     
    Posted 09-06-2019 08:10

    Hi !

     

    Do not use ge-x/x/x.* ; you need to know the id of all the units and then just filter them  ".X" and ".Y"

     

    If you have 3 units 0,1,2 then configure below :

    set snmp filter-interfaces interfaces ".\.0"

    set snmp filter-interfaces interfaces ".\.1"

    set snmp filter-interfaces interfaces ".\.2"

     

    Here is an another example 

    snmp {
    filter-interfaces {
    interfaces {
    cbp0;
    demux0;
    gre0;
    tap;
    gre;
    ipip;
    pime;
    pimd;
    mtun;
    pip0;
    dsc;
    irb;
    pp0;
    lsi;
    ip-*;
    lt-*;
    mt-*;
    pe-*;
    pfe-*;
    pfh-*;
    ut-*;
    vt-*;
    ".*\.32767";
    ".*\.16384";
    pd-*;
    lc-*;
    ".*\.32768";
    ".*\.16386";
    ".*\.16385";
    ".\.0";
    jsrv.*;
    esi;
    fxp0;
    }
    }

     

    Regards

    Arpit 



  • 3.  RE: MX - SNMP filter-interface - only Get physical interfaces

     
    Posted 09-06-2019 08:15

    Hi !

     

    Another good way is expalined in this KB below by using (!)  operator ;

    https://kb.juniper.net/InfoCenter/index?page=content&id=KB31064&actp=METADATA

    KB31064

     

    labroot@jtac-MX480-r007-re0# show snmp
    filter-interfaces {
    interfaces {
    "!(ge-.*/[0-9]$|ge-.*/1[0-9]$|xe-.*/[0-9]$|xe-.*/1[0-9]$|ae[0-9] $)";
    }
    all-internal-interfaces;
    }
    filter-duplicates;

     

     

     

    Hope this helps !!

     

    +++++++++++++++++++++++++++++++++++++++++++++

    Accept as Solution = cool !
    Accept as Solution+Kudo = You are a Star !

    +++++++++++++++++++++++++++++++++++++++++++++

     

    Regards

    Arpit

     



  • 4.  RE: MX - SNMP filter-interface - only Get physical interfaces
    Best Answer

    Posted 09-09-2019 01:56

    Hey Arpitch,

     

    I used the following configuration to push back the CPU %:

     

    beelze@ams-nik-er3# show snmp 
    filter-interfaces {
        interfaces {
            pp0;
            demux0;
            ".\.[0-50000]";
        }
        all-internal-interfaces;
    }
    filter-duplicates;

    and it does filter out most units, except for a view on some interfaces. 

    Do you know why that is?

     



  • 5.  RE: MX - SNMP filter-interface - only Get physical interfaces

     
    Posted 09-09-2019 07:22

    Hi !

     

    This statement  :".\.[0-50000]";   should help out filter all the units 0 to 50000.

     

    The better wasy is explained in KB 

    https://kb.juniper.net/InfoCenter/index?page=content&id=KB31064&actp=METADATA

    KB31064

     

    Please use this for accuracy:

     

    filter-interfaces {

        interfaces {

            pp0;

            demux0;

            "!(ge-.*/[0-9]$|ge-.*/1[0-9]$|xe-.*/[0-9]$|xe-.*/1[0-9]$|ae[0-9] $)";

        }

        all-internal-interfaces;

    }

    filter-duplicates;

     

     

    If your CPU is still high after you applied the above config ; then please share the list of mibs you are running .

    Also check how many servers are polling from this device ? 

     

    If the issue still persists then open a JTAC case, we might need to log in and check what is consuming the CPU cycles.

    BTW what percentage utilization do you see for snmp in "show system process extensive" ?? 

     

    Regards

    Arpit 



  • 6.  RE: MX - SNMP filter-interface - only Get physical interfaces

    Posted 09-10-2019 00:37

    @arpitch wrote:

     

    Please use this for accuracy:

     

    filter-interfaces {

        interfaces {

            pp0;

            demux0;

            "!(ge-.*/[0-9]$|ge-.*/1[0-9]$|xe-.*/[0-9]$|xe-.*/1[0-9]$|ae[0-9] $)";

        }

        all-internal-interfaces;

    }

    filter-duplicates;


     I used this, and it does seem to filter out everything, or at least my NMS doesn't show any interfaces anymore.

    With the statements I'm using right now (previous post) the used CPU % is very low now. I'm happy with the results:

     

    beelze@ams-nik-er3> show system processes extensive | except 0.00 
    last pid:  2158;  load averages:  0.26,  0.52,  0.52  up 521+10:08:17    09:17:53
    162 processes: 4 running, 130 sleeping, 28 waiting
    
    Mem: 1067M Active, 352M Inact, 256M Wired, 174M Cache, 112M Buf, 134M Free
    Swap: 2915M Total, 2915M Free
    
    
      PID USERNAME         THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
       10 root               1 155   52     0K    16K RUN    3920.7 82.91% idle
     1673 root              11  44    0 21116K 11400K ucond  932.2H  5.03% clksyncd
       11 root               1 -56 -159     0K    16K WAIT   289.0H  0.05% swi2: netisr 0


  • 7.  RE: MX - SNMP filter-interface - only Get physical interfaces

     
    Posted 09-10-2019 07:00

    Hi Beeelzebub ,

     

                I'm glad that it worked out. 

               Please accept this as a solution so others can also benifit from your post. 

     

    +++++++++++++++++++++++++++++++++++++++++++++

    Accept as Solution = cool !
    Accept as Solution+Kudo = You are a Star !

    +++++++++++++++++++++++++++++++++++++++++++++

     

    Regards

    Arpit 



  • 8.  RE: MX - SNMP filter-interface - only Get physical interfaces

     
    Posted 09-11-2019 01:30
    Hi Beeelzebub,

    The correct solution is below and not the one that you accepted as solution . Please change it to avoid confusion once you get a chance.


    Please use this for accuracy:



    filter-interfaces {

    interfaces {

    pp0;

    demux0;

    "!(ge-.*/[0-9]$|ge-.*/1[0-9]$|xe-.*/[0-9]$|xe-.*/1[0-9]$|ae[0-9] $)";

    }

    all-internal-interfaces;

    }

    filter-duplicates;



    Regards
    Arpit