can't add my own MIB

This is a discussion on can't add my own MIB within the SNMP Users forums, part of the Networking and Network Related category; --===============1821741388== Content-Type: multipart/alternative; boundary="----=_Part_138206_9818636.1166031095429" ------=_Part_138206_9818636.1166031095429 Content-Type: text/plain; charset=ISO-8859-1; ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-13-2006
Artem Fedko
 
Posts: n/a
Default can't add my own MIB

--===============1821741388==
Content-Type: multipart/alternative;
boundary="----=_Part_138206_9818636.1166031095429"

------=_Part_138206_9818636.1166031095429
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

(Linux Gentoo)

I'm just begining to work with net-snpm paket... so I tried to create my own
MIB file and add it to the tree but stuck with the next problem.

First of all my simple mib file:

AF-MIB DEFINITIONS ::= BEGIN

IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32, mib-2
FROM SNMPv2-SMI
DisplayString
FROM SNMPv2-TC
afMIB MODULE-IDENTITY
LAST-UPDATED "200606140000Z"
ORGANIZATION "Ochen krutaya Firma"
CONTACT-INFO "na derevnu dedushke"
DESCRIPTION "Initial revision, published as part of RFC 1573."
::= { mib-2 95 }

afMIBObjects OBJECT IDENTIFIER ::= { afMIB 1 }
afTest OBJECT IDENTIFIER ::= { mib-2 97 }

testValue OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Test Value"
::= { afMIBObjects 1 }

testStr OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"May be alliens are innocent? And SCSI drives disappeared in the
Gates?"
::= { afTest 1 }

END

I tried to make all steps like in tutorial Using and loading
MIBS<http://net-snmp.sourceforge.net/tutorial/tutorial-5/commands/mib-options.html>

I've put AF-MIB in /usr/local/share/snmp/mibs and than I've tried to execute
snmptranslate

Like:
snmptranslate -m +AF-MIB -IR afMIB
snmptranslate -m +AF-MIB -IR testStr
etc...
But always got the same result:
Unknown object identifier: afMIB
Unknown object identifier: testStr
etc...

So... it seems that net-snmp can't see my MIB or don't want to see it... but
with CISCO-RHINO-MIB.my from tutorial all works perfectly ;)

Please, can anybody show me where I was wrong?

I'm looking forward to hearing from you!!!

------=_Part_138206_9818636.1166031095429
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

(Linux Gentoo)<br><br>I'm just begining to work with net-snpm paket... so I tried to create my own MIB file and add it to the tree but stuck with the next problem.<br><br>First of all my simple mib file:<br><br>AF-MIB DEFINITIONS ::= BEGIN
<br><br>IMPORTS<br>&nbsp;&nbsp;&nbsp; MODULE-IDENTITY, OBJECT-TYPE, Integer32, mib-2 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp; FROM SNMPv2-SMI<br>&nbsp;&nbsp;&nbsp; DisplayString <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp; FROM SNMPv2-TC<br>afMIB MODULE-IDENTITY<br>&nbsp;&nbsp;&nbsp; LAST-UPDATED &quot;200606140000Z&quot;
<br>&nbsp;&nbsp;&nbsp; ORGANIZATION &quot;Ochen krutaya Firma&quot;<br>&nbsp;&nbsp;&nbsp; CONTACT-INFO &quot;na derevnu dedushke&quot;<br>&nbsp;&nbsp;&nbsp; DESCRIPTION&nbsp; &quot;Initial revision, published as part of RFC 1573.&quot;<br>&nbsp;&nbsp;&nbsp; ::= { mib-2 95 }<br><br>afMIBObjects OBJECT IDENTIFIER ::= { afMIB 1 }
<br>afTest OBJECT IDENTIFIER ::= { mib-2 97 }<br><br>testValue&nbsp; OBJECT-TYPE<br>&nbsp;&nbsp;&nbsp; SYNTAX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Integer32<br>&nbsp;&nbsp;&nbsp; MAX-ACCESS&nbsp; read-only<br>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; current<br>&nbsp;&nbsp;&nbsp; DESCRIPTION &quot;Test Value&quot;<br>&nbsp;&nbsp;&nbsp; ::= { afMIBObjects 1 }
<br><br>testStr&nbsp; OBJECT-TYPE<br>&nbsp;&nbsp;&nbsp; SYNTAX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DisplayString<br>&nbsp;&nbsp;&nbsp; MAX-ACCESS&nbsp; read-only<br>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; current<br>&nbsp;&nbsp;&nbsp; DESCRIPTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp; &quot;May be alliens are innocent? And SCSI drives disappeared in the Gates?&quot;
<br>&nbsp;&nbsp; ::= { afTest 1 }<br><br>END<br><br>I tried to make all steps like in tutorial <a href="http://net-snmp.sourceforge.net/tutorial/tutorial-5/commands/mib-options.html">Using and loading MIBS</a><br><br>I've put AF-MIB in /usr/local/share/snmp/mibs and than I've tried to execute snmptranslate
<br><br>Like:<br>snmptranslate -m +AF-MIB -IR afMIB&nbsp; <br>snmptranslate -m +AF-MIB -IR testStr <br>etc...<br>But always got the same result:<br>Unknown object identifier: afMIB<br>Unknown object identifier: testStr<br>etc...
<br><br>So... it seems that net-snmp can't see my MIB or don't want to see it... but with CISCO-RHINO-MIB.my from tutorial all works perfectly ;)<br><br>Please, can anybody show me where I was wrong?<br><br>I'm looking forward to hearing from you!!!
<br><br><br><br><br><br><br><br><br><br>

------=_Part_138206_9818636.1166031095429--


--===============1821741388==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
--===============1821741388==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users

--===============1821741388==--

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:51 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0