Security Management

  • 1.  OID of RPM Counter

    Posted 02-08-2016 18:52

    Hi experts,

     

    Good day to you all.

     

    I want to ask about snmp oid number of rpm counter.

     

    I create rpm services between 2 juniper devices.

    Let's say:

    A - B

    A - C

     

    A is client, B and C is server. This configuration means, I create 2 rpm services in the device A (Let's say RPM service AB and RPM service AC). I use Junos Space to see the rpm measurement from both interconnections.

    Junos Space present the measurement result using snmp oid.

     

    Here are the actual snmp oid of rpm measurement for standard deviation (jnxRpmResultsCalculatedTable) in devices A:

    9.71.82.74.75.84.78.48.48.49.12.116.111.95.71.83.74.75.84.78.48.48.49.1.1

    9.71.82.74.75.84.78.48.48.49.12.116.111.95.71.83.74.75.84.78.48.48.50.1.1

     

    I noticed the difference is the last third digit, but how I know which oid indicates rpm measurement from RPM service AB and which from RPM service AC?

     

     

     

    Thanks in advance.

     

     

    Best Regards,

     

     

    Martin Pakpahan


    #junos-space
    #RPM
    #oid
    #network-monitoring


  • 2.  RE: OID of RPM Counter
    Best Answer

    Posted 02-09-2016 06:54

    The OIDs you're getting contain the decimal values of each of the ascii characties in the probe test name.

    It's not pretty.

     

    The format for the name you're seeking is defined as "pingCtlTestName" in the rpm mib.

    See /usr/share/snmp/mibs/mib-jnx-rpm.txt on your Space device for the exact definitions.

     

     

     

    If you want to extract the name string from that OID, you have to map each of the decimal values to their corresponding ascii character and concatenate them.  

    9 -> \t  (tab)

    71 -> "G"

    82 -> "R"

    74 -> "J",

     

    etc.

    So, this oid: 9.71.82.74.75.84.78.48.48.49.12.116.111.95.71.83.74.75.84.78.48.48.49.1.1
    
    ...translates to this string:
            GRJKTN001
                     to_GSJKTN001
    
    
    and this oid: 9.71.82.74.75.84.78.48.48.49.12.116.111.95.71.83.74.75.84.78.48.48.50.1.1
    
    ...translates to this string:
            GRJKTN001
                     to_GSJKTN002
    

     

    I can hear you groaning from here.  😉

     

    Here's a perl script that will help you deocode/debug:

    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    my $input = $ARGV[0];
    print "input = $input\n";
    
    my @oid = split('\.', $input);
    
    foreach my $val (@oid) {
            print chr($val);
    }
    print "\n";
    
    exit
    


  • 3.  RE: OID of RPM Counter

    Posted 02-10-2016 04:00

    Hi dmcpherson,

     

    You hear me just fine. I am groaning loudly here 😄

     

    Thanks for the tip, man. You are a lifesaver. 🙂

     



  • 4.  RE: OID of RPM Counter

    Posted 05-17-2021 05:32
    To complete your answer, two sub oid are here to count the number of characters of owner and ping test.

    For example : 

    With this example : 1.3.6.1.4.1.2636.3.50.1.1.1.2.9.73.80.86.52.45.84.69.83.84.15.71.111.111.103.108.101.45.80.117.98.108.105.99.45.49.1
    
    1.3.6.1.4.1.2636.3.50.1.1.1.2. = Base OID
    9. Character count for the owner name
    73.80.86.52.45.84.69.83.84.  Owner name (In this case « IPV4-TEST »)
    15. Character count for the test name
    71.111.111.103.108.101.45.80.117.98.108.105.99.45.49  test Name (In this case « Google-Public-1 »)
    .1  Sample type

    Best regards,

    Benjamin

    ------------------------------
    BENJAMIN DENECE
    ------------------------------



  • 5.  RE: OID of RPM Counter

     
    Posted 02-10-2016 05:06

    Hi,

     

    Another way to quickly identify the associated information is to examine the XML reply.

     

    e.g.

    > show snmp mib walk jnxRpmResultsCalculatedTable | display xml
    
    <rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.1X46/junos">
        <snmp-object-information xmlns="http://xml.juniper.net/junos/12.1X46/junos-snmp">
            <snmp-object>
                <name>jnxRpmResCalcSamples.9.99.117.115.116.111.109.101.114.65.9.105.99.109.112.45.116.101.115.116.1.1</name>
                <index>
                    <index-name>pingCtlOwnerIndex</index-name>
                    <index-value>customerA</index-value>
                </index>
                <index>
                    <index-name>pingCtlTestName</index-name>
                    <index-value>icmp-test</index-value>
                </index>
                <index>
                    <index-name>jnxRpmResSumCollection</index-name>
                    <index-value>1</index-value>
                </index>
                <index>
                    <index-name>jnxRpmResCalcSet</index-name>
                    <index-value>1</index-value>
                </index>
                <object-value-type>gauge</object-value-type>
                <object-value>1</object-value>
                <oid>1.3.6.1.4.1.2636.3.50.1.3.1.2.9.99.117.115.116.111.109.101.114.65.9.105.99.109.112.45.116.101.115.116.1.1</oid>
            </snmp-object>
            <snmp-object>
            ...
            </snmp-object>
        </snmp-object-information>
        <cli>
            <banner></banner>
        </cli>
    </rpc-reply>

    Regards,

    Andy