Discussion:
[opennms-discuss] JunOS MIBS
Sander Steffann
2005-07-20 10:09:38 UTC
Permalink
Hi,

I am trying to get the Juniper MIBs
(https://www.juniper.net/techpubs/software/junos/junos73/juniper-mibs-7.3R1.
5.tgz) into OpenNMS, but I can't get mib2opennms to work. I only get
segmentation faults:

# mib2opennms mib-jnx-ipv6.txt
mib2opennms version 0.2.2
Segmentation fault

Can anyone help me to get these MIBs into OpenNMS, or does anyone have a
ready-to-use Juniper configuration that I can use?

Thanks,
Sander.
Tarus Balog
2005-07-20 16:16:48 UTC
Permalink
Post by Sander Steffann
Hi,
I am trying to get the Juniper MIBs
(https://www.juniper.net/techpubs/software/junos/junos73/juniper-
mibs-7.3R1.5.tgz)
into OpenNMS, but I can't get mib2opennms to work. I only get
# mib2opennms mib-jnx-ipv6.txt
mib2opennms version 0.2.2
Segmentation fault
This usually means that there is a problem with the ASN.1 notation in
your mibs.

I don't get a seg fault on that mib, but since:

grep NOTIF mib-jnx-ipv6.txt

and

grep TRAP mib-jnx-ipv6.txt

return nothing, there are no events defined in that MIB.

A quick search shows the following files support NOTIFICATION-TYPE
objects:

Stormbringer:~/Desktop/JuniperMibs tarus$ grep -l NOTIF *
mib-jnx-bgpmib2.txt
mib-jnx-cfgmgmt.txt
mib-jnx-chassis.txt
mib-jnx-coll.txt
mib-jnx-ldp.txt
mib-jnx-mpls.txt
mib-jnx-ping.txt
mib-jnx-pmon.txt
mib-jnx-rmon.txt
mib-jnx-sonet.txt
mib-jnx-sonetaps.txt
mib-jnx-vpn.txt


Let's check out the first one. if I run:

/usr/local/bin/mib2opennms mib-jnx-bgpmib2.txt

I get:

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.0.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>0</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

Note that the id looks wrong. It should be something like .1.3.6.1.4.1.x

This usually means that there is a broken import somewhere, so we
should include the MIB files in the current directory:

/usr/local/bin/mib2opennms -m. mib-jnx-bgpmib2.txt

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.0.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>0</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

Hrm, not much better, and adding the path to the default MIBs doesn't
help either:

/usr/local/bin/mib2opennms -m/usr/share/snmp/mibs:. mib-jnx-bgpmib2.txt

So, it's time to look into the mib file. The first NOTIFICATION-TYPE
object is:

jnxBgpM2Established NOTIFICATION-TYPE
::= { jnxBgpM2BaseNotifications 1 }

So let's work backwards.

jnxBgpM2BaseNotifications
OBJECT IDENTIFIER ::= { jnxBgpM2BaseScalars 0 }

jnxBgpM2BaseScalars
OBJECT IDENTIFIER ::= { jnxBgpM2 1 }

jnxBgpM2 MODULE-IDENTITY
::= { jnxBgpM2Experiment 1 }

Now, jnxBgpM2Experiment comes from:

jnxBgpM2Experiment
FROM JUNIPER-EXPERIMENT-MIB

Therein lies the problem. As mentioned in the README:

"If mib2opennms complains about a missing MIB, be sure that there is
a file
in your "-m" MIB path that has the *exact* name as the MIB it is
complaining
about.

For example, if it complains "Can't find RFC-1213" and you have a
file in
your path called "RFC1213", you must rename it or copy it to "RFC-1213".

The extensions .txt, .my and I believe .mib are acceptable, so in the
above example, RFC-1213.txt should work."

Well, there is no file called JUNIPER-EXPERIMENT-MIB. So:

cp mib-jnx-exp.txt JUNIPER-EXPERIMENT-MIB

and rerun:

/usr/local/bin/mib2opennms -m/usr/share/snmp/mibs:. mib-jnx-bgpmib2.txt

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.0.5.1.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>0</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

Better. More research shows that the JUNIPER-SMI MIB is referenced by
JUNIPER-EXPERIMENT-MIB:

cp mib-jnx-smi.txt JUNIPER-SMI

/usr/local/bin/mib2opennms -m/usr/share/snmp/mibs:. mib-jnx-bgpmib2.txt

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.1.3.6.1.4.1.2636.5.1.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>0</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

Success! The only problem is that "generic" is set to zero, so add
the -6 option:

/usr/local/bin/mib2opennms -6 -m/usr/share/snmp/mibs:. mib-jnx-
bgpmib2.txt

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.1.3.6.1.4.1.2636.5.1.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>6</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

This is just an example of how mib2opennms should work. I don't
understand the seg faults - could be an issue with the build. We
don't support stuff in contrib, so anyone with come C++ experience
might want to check it out for us. WORKSFORME on my Mac (built using
libsmi from fink).

-T

-----

Tarus Balog
The OpenNMS Group, Inc.
Main : +1 919 545 2553 Fax: +1 503-961-7746
Direct: +1 919 647 4749 Skype: tarusb
Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C
Sander Steffann
2005-07-20 21:18:58 UTC
Permalink
Hi Tarus,
Post by Tarus Balog
Post by Sander Steffann
I am trying to get the Juniper MIBs
(https://www.juniper.net/techpubs/software/junos/junos73/juniper-
mibs-7.3R1.5.tgz)
into OpenNMS, but I can't get mib2opennms to work. I only get
# mib2opennms mib-jnx-ipv6.txt
mib2opennms version 0.2.2
Segmentation fault
This usually means that there is a problem with the ASN.1 notation in
your mibs.
grep NOTIF mib-jnx-ipv6.txt
and
grep TRAP mib-jnx-ipv6.txt
return nothing, there are no events defined in that MIB.
I just picked a mib for testing. I should have looked at it first :-)
Post by Tarus Balog
--cut-- great example --cut--
This is just an example of how mib2opennms should work. I don't
understand the seg faults - could be an issue with the build. We don't
support stuff in contrib, so anyone with come C++ experience might want
to check it out for us. WORKSFORME on my Mac (built using libsmi from
fink).
Thank you very much! This realy helps. I am using mib2opennms from
opennms-1.2.2-1_fc1.i386.rpm. Now I know what to expect from mib2opennms
I'll try to find out what is wrong with it.

Thanks!
Sander.
Ville Leinonen
2005-07-21 05:11:02 UTC
Permalink
Hi,

I try to get bgp routes for my opennms, but there is some litle
problems. Opennms wont create rrd-file.
Everything else is ok juniper
eg. /var/opennms/rrd/snmp/6/juniperBufferFpc0.rrd is exists, so opennms
recognize my routers. Can someone give me a hint what is wrong?

When i check collectd.log it's says:
2005-07-21 07:58:29,344 DEBUG [SnmpPortal--1] SnmpNodeCollector:
getNextPdu: adding object id to
pdu: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.1.1.1
2005-07-21 07:58:29,344 DEBUG [SnmpPortal--1] SnmpNodeCollector:
getNextPdu: adding object id to
pdu: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1
2005-07-21 07:58:29,344 DEBUG [SnmpPortal--1] SnmpNodeCollector:
getNextPdu: adding object id to
pdu: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.0.1.1
2005-07-21 07:58:29,344 DEBUG [SnmpPortal--1] SnmpNodeCollector:
getNextPdu: adding object id to
pdu: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.0.1.1
2005-07-21 07:58:30,448 DEBUG [SnmpPortal--1] SnmpNodeCollector:
snmpReceivedPDU: current oid name,value
pair: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.9.0.1.1 : 19143
2005-07-21 07:58:30,449 DEBUG [SnmpPortal--1] SnmpNodeCollector:
snmpReceivedPDU: current oid name,value
pair: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.0.1.1 : 143958

And its also says:
2005-07-21 07:58:03,526 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 10 datasource: juniperBgp1Rec
2005-07-21 07:58:03,526 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 10 datasource: juniperBgp2Act
2005-07-21 07:58:03,526 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 10 datasource: juniperBgp2Rec
2005-07-21 07:58:30,947 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 6 datasource: juniperBgp1Act
2005-07-21 07:58:30,947 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 6 datasource: juniperBgp1Rec
2005-07-21 07:58:30,947 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 6 datasource: juniperBgp2Act
2005-07-21 07:58:30,947 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 6 datasource: juniperBgp2Rec


My datacollection-config.xml

<!-- Juniper MIBs -->
<group name = "juniper-router" ifType = "ignore">
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.8.6.1.0" instance="0"
alias="juniperCpuFeb" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.8.7.1.0" instance="0"
alias="juniperCpuFpc0" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.8.7.2.0" instance="0"
alias="juniperCpuFpc1" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.8.9.1.0" instance="0"
alias="juniperCpuRe" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.7.6.1.0" instance="0"
alias="juniperTempFeb" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.7.7.1.0" instance="0"
alias="juniperTempFpc0" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.7.7.2.0" instance="0"
alias="juniperTempFpc1" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.7.9.1.0" instance="0"
alias="juniperTempRe" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.11.6.1.0" instance="0"
alias="juniperBufferFeb" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.11.7.1.0" instance="0"
alias="juniperBufferFpc0" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.11.7.2.0" instance="0"
alias="juniperBufferFpc1" type="gauge32"/>
</group>

<!-- Juniper MIBs BGP -->
<group name = "juniper-router-bgp" ifType = "ignore">
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.1.1.1" instance="0"
alias="juniperBgp1Act" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1" instance="0"
alias="juniperBgp1Rec" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.0.1.1" instance="0"
alias="juniperBgp2Act" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.0.1.1" instance="0"
alias="juniperBgp2Rec" type="gauge32"/>
</group>

<systemDef name = "Juniper Routers">
<sysoidMask>.1.3.6.1.4.1.2636.1.</sysoidMask>
<collect>
<includeGroup>juniper-router</includeGroup>
<includeGroup>juniper-router-bgp</includeGroup>
</collect>
</systemDef>

My snmp-graph.properties
report.juniper.bgpact.name=BGP (Juniper)
report.juniper.bgpact.columns=juniperBgp1Act,juniperBgp2Act
report.juniper.bgpact.type=node
report.juniper.temp.command=--title="Curren Active BGP Routes" \
DEF:val1={rrd1}:juniperBgp1Act:AVERAGE \
DEF:val2={rrd2}:juniperBgp2Act:AVERAGE \
LINE2:val1#0000ff:"BGP Peer 1 " \
GPRINT:val1:AVERAGE:" Avg \\: %8.2lf %s" \
GPRINT:val1:MIN:"Min \\: %8.2lf %s" \
GPRINT:val1:MAX:"Max \\: %8.2lf %s\\n" \
LINE2:val2#ff0000:"BGP Peer 2" \
GPRINT:val2:AVERAGE:" Avg \\: %8.2lf %s" \
GPRINT:val2:MIN:"Min \\: %8.2lf %s" \
GPRINT:val2:MAX:"Max \\: %8.2lf %s\\n" \

Best regards,

Ville Leinonen
Ville Leinonen
2005-07-21 06:29:13 UTC
Permalink
Hi again,

Forget my last post. Myopennms version is:

Version: 1.2.3-1
Server Time: Thu Jul 21 09:24:42 EEST 2005
Client Time: Thu Jul 21 2005 09:24:42 GMT+0300 (FLE Daylight Time)
Java Version: 1.4.2_08 Sun Microsystems Inc.
Java Virtual Machine: 1.4.2_08-b03 Sun Microsystems Inc.
Operating System: Linux 2.4.21-32.0.1.ELsmp (i386)
Servlet Container: Apache Tomcat/4.1 (Servlet Spec 2.3)
Post by Ville Leinonen
Hi,
I try to get bgp routes for my opennms, but there is some litle
problems. Opennms wont create rrd-file.
Everything else is ok juniper
eg. /var/opennms/rrd/snmp/6/juniperBufferFpc0.rrd is exists, so opennms
recognize my routers. Can someone give me a hint what is wrong?
getNextPdu: adding object id to
pdu: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.1.1.1
getNextPdu: adding object id to
pdu: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1
getNextPdu: adding object id to
pdu: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.0.1.1
getNextPdu: adding object id to
pdu: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.0.1.1
snmpReceivedPDU: current oid name,value
pair: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.9.0.1.1 : 19143
snmpReceivedPDU: current oid name,value
pair: .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.0.1.1 : 143958
2005-07-21 07:58:03,526 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 10 datasource: juniperBgp1Rec
2005-07-21 07:58:03,526 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 10 datasource: juniperBgp2Act
2005-07-21 07:58:03,526 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 10 datasource: juniperBgp2Rec
2005-07-21 07:58:30,947 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 6 datasource: juniperBgp1Act
2005-07-21 07:58:30,947 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 6 datasource: juniperBgp1Rec
2005-07-21 07:58:30,947 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 6 datasource: juniperBgp2Act
2005-07-21 07:58:30,947 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 6 datasource: juniperBgp2Rec
My datacollection-config.xml
<!-- Juniper MIBs -->
<group name = "juniper-router" ifType = "ignore">
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.8.6.1.0" instance="0"
alias="juniperCpuFeb" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.8.7.1.0" instance="0"
alias="juniperCpuFpc0" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.8.7.2.0" instance="0"
alias="juniperCpuFpc1" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.8.9.1.0" instance="0"
alias="juniperCpuRe" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.7.6.1.0" instance="0"
alias="juniperTempFeb" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.7.7.1.0" instance="0"
alias="juniperTempFpc0" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.7.7.2.0" instance="0"
alias="juniperTempFpc1" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.7.9.1.0" instance="0"
alias="juniperTempRe" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.11.6.1.0" instance="0"
alias="juniperBufferFeb" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.11.7.1.0" instance="0"
alias="juniperBufferFpc0" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.3.1.13.1.11.7.2.0" instance="0"
alias="juniperBufferFpc1" type="gauge32"/>
</group>
<!-- Juniper MIBs BGP -->
<group name = "juniper-router-bgp" ifType = "ignore">
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.1.1.1" instance="0"
alias="juniperBgp1Act" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1" instance="0"
alias="juniperBgp1Rec" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.0.1.1" instance="0"
alias="juniperBgp2Act" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.0.1.1" instance="0"
alias="juniperBgp2Rec" type="gauge32"/>
</group>
<systemDef name = "Juniper Routers">
<sysoidMask>.1.3.6.1.4.1.2636.1.</sysoidMask>
<collect>
<includeGroup>juniper-router</includeGroup>
<includeGroup>juniper-router-bgp</includeGroup>
</collect>
</systemDef>
My snmp-graph.properties
report.juniper.bgpact.name=BGP (Juniper)
report.juniper.bgpact.columns=juniperBgp1Act,juniperBgp2Act
report.juniper.bgpact.type=node
report.juniper.temp.command=--title="Curren Active BGP Routes" \
DEF:val1={rrd1}:juniperBgp1Act:AVERAGE \
DEF:val2={rrd2}:juniperBgp2Act:AVERAGE \
LINE2:val1#0000ff:"BGP Peer 1 " \
GPRINT:val1:AVERAGE:" Avg \\: %8.2lf %s" \
GPRINT:val1:MIN:"Min \\: %8.2lf %s" \
GPRINT:val1:MAX:"Max \\: %8.2lf %s\\n" \
LINE2:val2#ff0000:"BGP Peer 2" \
GPRINT:val2:AVERAGE:" Avg \\: %8.2lf %s" \
GPRINT:val2:MIN:"Min \\: %8.2lf %s" \
GPRINT:val2:MAX:"Max \\: %8.2lf %s\\n" \
Best regards,
Ville Leinonen
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Tarus Balog
2005-07-21 13:40:08 UTC
Permalink
Post by Ville Leinonen
2005-07-21 07:58:03,526 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 10 datasource: juniperBgp1Rec
My datacollection-config.xml
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1"
instance="0"
alias="juniperBgp1Rec" type="gauge32"/>
Please post an snmpwalk of .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1.
My guess is that your OID or instance is wrong.

-T


-----

Tarus Balog
The OpenNMS Group, Inc.
Main : +1 919 545 2553 Fax: +1 503-961-7746
Direct: +1 919 647 4749 Skype: tarusb
Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C
Ville Leinonen
2005-07-22 06:39:21 UTC
Permalink
Hi,

Here comes:

[***@netsrv01 etc]# snmpwalk -c zzzzz -v 2c
xx.x.xx.xx .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1.
.1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1.: Unknown Object Identifier
(Sub-id not found: enterprises -> )
[***@netsrv01 etc]#

[***@netsrv01 etc]# snmpwalk -c zzzzz -v 2c
xx.x.xx.xx .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1
SNMPv2-SMI::enterprises.2636.5.1.1.2.6.2.1.7.1.1.1 = Gauge32: 168062
[***@netsrv01 etc]#

Br,

Ville
Post by Tarus Balog
Post by Ville Leinonen
2005-07-21 07:58:03,526 DEBUG [CollectdScheduler-50 Pool-fiber49]
SnmpCollector: updateRRDs: Skipping update, no data retrieved for
nodeId: 10 datasource: juniperBgp1Rec
My datacollection-config.xml
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1"
instance="0"
alias="juniperBgp1Rec" type="gauge32"/>
Please post an snmpwalk of .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1.
My guess is that your OID or instance is wrong.
-T
-----
Tarus Balog
The OpenNMS Group, Inc.
Main : +1 919 545 2553 Fax: +1 503-961-7746
Direct: +1 919 647 4749 Skype: tarusb
Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
David Hustace
2005-07-22 09:17:46 UTC
Permalink
Post by Ville Leinonen
xx.x.xx.xx .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1
SNMPv2-SMI::enterprises.2636.5.1.1.2.6.2.1.7.1.1.1 = Gauge32: 168062
There is your problem for this object. You posted this from your
Post by Ville Leinonen
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1" instance="0"
alias="juniperBgp1Rec" type="gauge32"/>
The actual instance is not ".0" for you are querying a tabular
object. I don't have access to the full mib, however, after a bit of
searching this appears to be from the MIB: BGP4-V2-MIB-JUNIPER and
the table: jnxBgpM2PrefixInPrefixes
(1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7) I believe this table is indexed
by: jnxBgpM2PeerIndex...


jnxBgpM2PeerIndex OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This value is a unique index for the remote peer entry
in the jnxBgpM2PeerTable. It is assigned by the agent
at the point of creation of the jnxBgpM2PeerTable row
entry. While its value is guaranteed to be unique at
any time, it is otherwise opaque to the management
application with respect to its value or the contiguity
of jnxBgpM2PeerIndex row instance values across rows of
the jnxBgpM2PeerTable. It is used to provide an index
structure for other tables whose data is logically
per-peer.

For explicitly configured peers, this value will remain
consistent until this row is deleted by deleting the
configured peers. Unconfigured peers will generate
a monotonically increasing number when a BGP FSM is
built to process the peering session. Values in the
jnxBgpM2PeerTable and other tables utilizing
jnxBgpM2PeerIndex
are expected to remain in existence for an arbitrary
time after the unconfigured peer has been deleted
in order to allow management applications to extract
useful management information for those peers. Thus,
an unconfigured peer using the same indices as the
jnxBgpM2PeerTable that comes up while this row still
exists will re-utilize the same row."
::= { jnxBgpM2PeerEntry 14 }


Trying to pull that index together, I get this OID:
1.3.6.1.4.1.2636.5.1.1.2.1.1.1.14

Can you walk that OID? My guess is that these are the instances you
will use, not "0".

Something like: jnxBgpM2PrefixInPrefixes.jnxBgpM2PeerIndex
(1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.jnxBgpM2PeerIndex)




David Hustace
The OpenNMS Group, Inc.
http://www.opennms.com
Ville Leinonen
2005-07-25 06:12:11 UTC
Permalink
Hi,

Now its seems to work. Current configuration is:

<group name = "juniper-router-bgp" ifType = "ignore">
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.0" instance="1"
alias="juniperBgp1Act" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.0" instance="1"
alias="juniperBgp1Rec" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.8.1" instance="1"
alias="juniperBgp2Act" type="gauge32"/>
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1" instance="1"
alias="juniperBgp2Rec" type="gauge32"/>
</group>

Br,

Ville
Post by David Hustace
Post by Ville Leinonen
xx.x.xx.xx .1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1
SNMPv2-SMI::enterprises.2636.5.1.1.2.6.2.1.7.1.1.1 = Gauge32: 168062
There is your problem for this object. You posted this from your
Post by Ville Leinonen
<mibObj oid=".1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.1.1.1" instance="0"
alias="juniperBgp1Rec" type="gauge32"/>
The actual instance is not ".0" for you are querying a tabular
object. I don't have access to the full mib, however, after a bit of
searching this appears to be from the MIB: BGP4-V2-MIB-JUNIPER and
the table: jnxBgpM2PrefixInPrefixes
(1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7) I believe this table is indexed
by: jnxBgpM2PeerIndex...
jnxBgpM2PeerIndex OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This value is a unique index for the remote peer entry
in the jnxBgpM2PeerTable. It is assigned by the agent
at the point of creation of the jnxBgpM2PeerTable row
entry. While its value is guaranteed to be unique at
any time, it is otherwise opaque to the management
application with respect to its value or the contiguity
of jnxBgpM2PeerIndex row instance values across rows of
the jnxBgpM2PeerTable. It is used to provide an index
structure for other tables whose data is logically
per-peer.
For explicitly configured peers, this value will remain
consistent until this row is deleted by deleting the
configured peers. Unconfigured peers will generate
a monotonically increasing number when a BGP FSM is
built to process the peering session. Values in the
jnxBgpM2PeerTable and other tables utilizing
jnxBgpM2PeerIndex
are expected to remain in existence for an arbitrary
time after the unconfigured peer has been deleted
in order to allow management applications to extract
useful management information for those peers. Thus,
an unconfigured peer using the same indices as the
jnxBgpM2PeerTable that comes up while this row still
exists will re-utilize the same row."
::= { jnxBgpM2PeerEntry 14 }
1.3.6.1.4.1.2636.5.1.1.2.1.1.1.14
Can you walk that OID? My guess is that these are the instances you
will use, not "0".
Something like: jnxBgpM2PrefixInPrefixes.jnxBgpM2PeerIndex
(1.3.6.1.4.1.2636.5.1.1.2.6.2.1.7.jnxBgpM2PeerIndex)
David Hustace
The OpenNMS Group, Inc.
http://www.opennms.com
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Sander Steffann
2005-07-20 21:42:24 UTC
Permalink
Hi,
Post by Tarus Balog
This is just an example of how mib2opennms should work. I don't
understand the seg faults - could be an issue with the build. We don't
support stuff in contrib, so anyone with come C++ experience might want
to check it out for us. WORKSFORME on my Mac (built using libsmi from
fink).
After fixing the filenames and paths the segfaults disappeared, so
everything is working great now! (at least: I get nice output. I'll have to
check if it matches the MIB :-)

Thanks!
Sander.
Andrew Hood
2005-07-20 22:27:47 UTC
Permalink
-- serious snippage has occurred --
Post by Tarus Balog
This is just an example of how mib2opennms should work. I don't
understand the seg faults - could be an issue with the build. We don't
support stuff in contrib, so anyone with come C++ experience might want
to check it out for us. WORKSFORME on my Mac (built using libsmi from
fink).
Whenever I'm looking at a MIB the absolutely positivley first thing I do
is run smilint over it.

There is no point in trying to do anything with the MIB until "smilint
-l4 <MIBfile>" returns nothing worse than warnings.

As mib2opennms uses the same parser, you can not expect it to have a
valid parse tree from which to build the xml it the MIB is faulty. The
walk through the parse tree segfaults if the MIB has errors.

I know this from experience of writng my own translator based on libsmi
to convert MIBs into formats for use with Tivoli Netview and Tivoli TEC.
This parser also segfaults if the MIB has errors.

I suspect the output of smiLoadModule() needs to be checked the way
smidump does before using the parse tree.

I would expect mib2opennms to return an effectively empty file it there
were no traps defined.
--
There's no point in being grown up if you can't be childish sometimes.
-- Dr. Who
Tarus Balog
2005-07-21 13:37:38 UTC
Permalink
Post by Andrew Hood
I would expect mib2opennms to return an effectively empty file it there
were no traps defined.
Yuppers. I think I may be the version of libsmi people are running.
On my Mac it's version 2.0.21 and I never get seg faults - just empty
files if there is an error, and weird looking files if there is a
problem.

Compiling MIBs is not easy. I use to work with NerveCenter and it was
a stickler for proper ASN.1 and mib2opennms is just as strict.

-T

-----

Tarus Balog
The OpenNMS Group, Inc.
Main : +1 919 545 2553 Fax: +1 503-961-7746
Direct: +1 919 647 4749 Skype: tarusb
Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C
c***@parole.state.ny.us
2005-07-20 16:49:11 UTC
Permalink
Tarus,

I don't know if your explanation will end up in the How-to documentation
but I know I will be adding it to mine. Very well done!

Chris Lightner
NYS Division of Parole
Network Specialist



Tarus Balog <***@opennms.org>
Sent by: To: opennms-***@lists.sourceforge.net
opennms-discuss-***@lists.sour cc:
ceforge.net Subject: Re: [opennms-discuss] JunOS MIBS


07/20/2005 12:16 PM
Please respond to
opennms-discuss
Post by Sander Steffann
Hi,
I am trying to get the Juniper MIBs
(https://www.juniper.net/techpubs/software/junos/junos73/juniper-
mibs-7.3R1.5.tgz)
into OpenNMS, but I can't get mib2opennms to work. I only get
# mib2opennms mib-jnx-ipv6.txt
mib2opennms version 0.2.2
Segmentation fault
This usually means that there is a problem with the ASN.1 notation in
your mibs.

I don't get a seg fault on that mib, but since:

grep NOTIF mib-jnx-ipv6.txt

and

grep TRAP mib-jnx-ipv6.txt

return nothing, there are no events defined in that MIB.

A quick search shows the following files support NOTIFICATION-TYPE
objects:

Stormbringer:~/Desktop/JuniperMibs tarus$ grep -l NOTIF *
mib-jnx-bgpmib2.txt
mib-jnx-cfgmgmt.txt
mib-jnx-chassis.txt
mib-jnx-coll.txt
mib-jnx-ldp.txt
mib-jnx-mpls.txt
mib-jnx-ping.txt
mib-jnx-pmon.txt
mib-jnx-rmon.txt
mib-jnx-sonet.txt
mib-jnx-sonetaps.txt
mib-jnx-vpn.txt


Let's check out the first one. if I run:

/usr/local/bin/mib2opennms mib-jnx-bgpmib2.txt

I get:

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.0.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>0</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

Note that the id looks wrong. It should be something like .1.3.6.1.4.1.x

This usually means that there is a broken import somewhere, so we
should include the MIB files in the current directory:

/usr/local/bin/mib2opennms -m. mib-jnx-bgpmib2.txt

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.0.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>0</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

Hrm, not much better, and adding the path to the default MIBs doesn't
help either:

/usr/local/bin/mib2opennms -m/usr/share/snmp/mibs:. mib-jnx-bgpmib2.txt

So, it's time to look into the mib file. The first NOTIFICATION-TYPE
object is:

jnxBgpM2Established NOTIFICATION-TYPE
::= { jnxBgpM2BaseNotifications 1 }

So let's work backwards.

jnxBgpM2BaseNotifications
OBJECT IDENTIFIER ::= { jnxBgpM2BaseScalars 0 }

jnxBgpM2BaseScalars
OBJECT IDENTIFIER ::= { jnxBgpM2 1 }

jnxBgpM2 MODULE-IDENTITY
::= { jnxBgpM2Experiment 1 }

Now, jnxBgpM2Experiment comes from:

jnxBgpM2Experiment
FROM JUNIPER-EXPERIMENT-MIB

Therein lies the problem. As mentioned in the README:

"If mib2opennms complains about a missing MIB, be sure that there is
a file
in your "-m" MIB path that has the *exact* name as the MIB it is
complaining
about.

For example, if it complains "Can't find RFC-1213" and you have a
file in
your path called "RFC1213", you must rename it or copy it to "RFC-1213".

The extensions .txt, .my and I believe .mib are acceptable, so in the
above example, RFC-1213.txt should work."

Well, there is no file called JUNIPER-EXPERIMENT-MIB. So:

cp mib-jnx-exp.txt JUNIPER-EXPERIMENT-MIB

and rerun:

/usr/local/bin/mib2opennms -m/usr/share/snmp/mibs:. mib-jnx-bgpmib2.txt

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.0.5.1.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>0</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

Better. More research shows that the JUNIPER-SMI MIB is referenced by
JUNIPER-EXPERIMENT-MIB:

cp mib-jnx-smi.txt JUNIPER-SMI

/usr/local/bin/mib2opennms -m/usr/share/snmp/mibs:. mib-jnx-bgpmib2.txt

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.1.3.6.1.4.1.2636.5.1.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>0</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

Success! The only problem is that "generic" is set to zero, so add
the -6 option:

/usr/local/bin/mib2opennms -6 -m/usr/share/snmp/mibs:. mib-jnx-
bgpmib2.txt

<mask>
<maskelement>
<mename>id</mename>
<mevalue>.1.3.6.1.4.1.2636.5.1.1.1</mevalue>
</maskelement>
<maskelement>
<mename>generic</mename>
<mevalue>6</mevalue>
</maskelement>
<maskelement>
<mename>specific</mename>
<mevalue>1</mevalue>
</maskelement>
</mask>

This is just an example of how mib2opennms should work. I don't
understand the seg faults - could be an issue with the build. We
don't support stuff in contrib, so anyone with come C++ experience
might want to check it out for us. WORKSFORME on my Mac (built using
libsmi from fink).

-T

-----

Tarus Balog
The OpenNMS Group, Inc.
Main : +1 919 545 2553 Fax: +1 503-961-7746
Direct: +1 919 647 4749 Skype: tarusb
Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of
this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Tarus Balog
2005-07-20 21:05:07 UTC
Permalink
Post by c***@parole.state.ny.us
I don't know if your explanation will end up in the How-to
documentation
but I know I will be adding it to mine. Very well done!
Thanks. I added it to the bottom of the mib2opennms wiki page:

http://www.opennms.org/wiki/index.php?page=mib2opennms

-T

-----

Tarus Balog
The OpenNMS Group, Inc.
Main : +1 919 545 2553 Fax: +1 503-961-7746
Direct: +1 919 647 4749 Skype: tarusb
Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C
Continue reading on narkive:
Search results for '[opennms-discuss] JunOS MIBS' (Questions and Answers)
8
replies
Do you think NASA should get more funding?
started 2008-10-09 16:23:19 UTC
astronomy & space
Loading...