>From: "Dave Shield" <[EMAIL PROTECTED]> >To: "Hans Dampf" <[EMAIL PROTECTED]> >CC: [email protected] >Subject: Re: Not all mib files of a dir get parsed by snmptranslate >Date: Wed, 6 Jun 2007 10:10:30 +0100 > >On 06/06/07, Hans Dampf <[EMAIL PROTECTED]> wrote: > > Not all of the mibs in /usr/share/snmp/mibs get parsed when execute: > > > > snmptranslate -Dparse > >That's correct. >The library has a list of MIB files to load by default. > >If you have a MIB that isn't on this list, you must explicitly request >that it be added - either as a one-off for a particular command: > > snmptranslate -m +GWMTA-MIB > >or add it to the default list > > echo mibs +GWMTA-MIB >> $HOME/.snmp/snmp.conf > >See the FAQ entry > How do I add a MIB to the tools? > (http://www.net-snmp.org/wiki/index.php/FAQ:Applications_02) >for details. > > > > and GWMTA-MIB is found and called Module 21 > > parse-mibs: Checking file: /usr/share/snmp/mibs/GWMTA-MIB.txt... > > parse-mibs: Module 21 GWMTA-MIB is in >/usr/share/snmp/mibs/GWMTA-MIB.txt > > > for module 21 there is no further entry - why gets this mib not > > parsed/imported? > >Because it's not on the default list. >The library opens the file, and notes which MIB it contains, so that it >can be loaded if required. But it doesn't parse the MIB file >automatically. > > > > > I expect the code the parser needs is in > > /opt/novell/groupwise/agents/lib/libgwsnmp.so > > > therefore I've added in snmpd.conf > > dlmod Gwsnmp /opt/novell/groupwise/agents/lib/libgwsnmp.so > >No - that'll be the code to *implement* these objects, and is only >relevant to the agent. Client-side tools (such as snmptranslate) >only work with the MIB file. > If you don't load the MIB file, then the client-side tools won't >recognise the names of MIB objects defined within it. This is >completely separate from whether the agent implements these >objects or not. > The agent can implement objects that the tools don't know about >(in which case, the results will be displayed using numeric OIDs). >And the tools can load MIBs that the agent doesn't implement >(in which case, these values won't appear in the tool output at all) > > >The client and server side processing are two completely different >things. > >Dave >
Dave, thank you very much for answer - it helped! so we can forget the hole tools part and focus only to the agent, since I am still not able to get my response. The file I've added to the agent, belongs to the MTA, so I pick an OID from the GWMTA-MIB monitoring-server:/usr/share/snmp # snmptranslate -m GWMTA-MIB -On GWMTA-MIB::mtaClosedDomains No log handling enabled - turning on stderr logging OBJECT-TYPE MACRO (lines 25..39 parsed and ignored). ..1.3.6.1.4.1.23.2.37.1.1.1.4 monitoring-server:/usr/share/snmp # with adding a .1 at the end, a 'old' netware sever gives me a response: monitoring-server:/usr/share/snmp # snmpget -m GWMTA-MIB -c public -v 1 <old-netware-box> .1.3.6.1.4.1.23.2.37.1.1.1.4.1 OBJECT-TYPE MACRO (lines 25..39 parsed and ignored). GWMTA-MIB::mtaClosedDomains.1 = Gauge32: 0 monitoring-server:/usr/share/snmp # but my server with the extended agent: monitoring-server:/usr/share/snmp # snmpget -m GWMTA-MIB -c public -v 1 <host-with-extended-agent> .1.3.6.1.4.1.23.2.37.1.1.1.4.1 OBJECT-TYPE MACRO (lines 25..39 parsed and ignored). Error in packet Reason: (noSuchName) There is no such variable name in this MIB. monitoring-server:/usr/share/snmp # net-snmpd.log shows: server:/var/log # more net-snmpd.log MODULE-IDENTITY MACRO (lines 55..79 parsed and ignored). OBJECT-IDENTITY MACRO (lines 81..103 parsed and ignored). OBJECT-TYPE MACRO (lines 212..298 parsed and ignored). NOTIFICATION-TYPE MACRO (lines 302..334 parsed and ignored). TEXTUAL-CONVENTION MACRO (lines 8..48 parsed and ignored). OBJECT-TYPE MACRO (lines 25..39 parsed and ignored). GWSNMP: Entered the Gwsnmp module... Warning: novell.2 is both gateways and mibDoc (/usr/share/snmp/mibs/GWMTA-MIB.txt) GWSNMP: Entered the registerMIBS function Entered the Polling-end of the GWSNMP support GWSNMP/XPLAT: Entered the initPolling GWSNMP/XPLAT: Entered the PollingCallback function GWSNMP/XPLAT: Trap server is listening on 8052 NET-SNMP version 5.1.3.1 Connection from 172.18.100.XX GWSNMP: UnixSNMPCallBack (for 160 type request) mta GWSNMP: OID (length: 14) for mta: .1.3.6.1.4.1.23.2.37.1.1.1.4.1 GWSNMP: GetMibValue retured error 1 GWSNMP: ProcessSnmpRequests failed for MODE_GET request server:/var/log # I don't know what I can check else - do you have another idea? Iareber _________________________________________________________________ Live Earth - ein gigantisches Konzert kämpft gegen die Klimakrise. http://liveearthsos.msn.com/Hub.aspx?mkt=de-ch ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
