Thanks for the response but unfortunately still no luck :\
I've written my own .c/.h files and compiled into the agent instead of
using mib2c. Is there any configuration in need to do in the c files in
order to get naming working or is it all in the MIB?
On Fri, May 8, 2015 at 12:29 AM, Tim Culhane <tim.j.culh...@gmail.com>
wrote:
> Hi,
>
>
>
> Try adding the following line to your $HOME/.snmp/snmp.conf file:
>
>
>
> MIBS +PEAXY-SNMP-MIB
>
>
>
> And see if that works.
>
>
>
> Tim
>
>
>
>
>
> *From:* Erik Steggall [mailto:estegg...@peaxy.net]
> *Sent:* 08 May 2015 01:41
> *To:* net-snmp-users@lists.sourceforge.net
> *Subject:* Can't add MIB to tools
>
>
>
> I've created a custom MIB and I'm able to add the MIB to the agent (get
> and set values work) but I'm unable to add the MIB so that the tools
> recognize the names of my OIDs. Do I need to add anything to the .c/.h
> files in order to get the naming to work correctly?
>
> Pages I've read:
> http://www.net-snmp.org/wiki/index.php/TUT:Using_and_loading_MIBS
> http://www.net-snmp.org/wiki/index.php/FAQ:Applications_06
> http://www.net-snmp.org/wiki/index.php/FAQ:Agent_06
>
> More Info:
>
>
>
> # This call fails and IDK why
>
> > snmptranslate -m +PEAXY-SNMP-MIB -IR -Of pxeSnmpMib
> Unknown object identifier: pxeSnmpMib
>
> # OIDs are definitely there...
> > snmpwalk localhost .1.3.6.1.4.1.45190
> SNMPv2-SMI::enterprises.45190.1.1.1.0 = INTEGER: 42
> SNMPv2-SMI::enterprises.45190.1.1.2.0 = STRING: "Peaxy Inc"
>
> # Adding -m doesn't seem to help
>
> > snmpwalk -m +PEAXY-SNMP-MIB localhost .1.3.6.1.4.1.45190
> SNMPv2-SMI::enterprises.45190.1.1.1.0 = INTEGER: 42
> SNMPv2-SMI::enterprises.45190.1.1.2.0 = STRING: "Peaxy Inc"
>
> # Can't use names
> > snmpwalk -m +PEAXY-SNMP-MIB localhost PEAXY-SNMP-MIB::pxeSnmpMib
> PEAXY-SNMP-MIB::pxeSnmpMib: Unknown Object Identifier
>
>
>
> # My mibdirs
>
> > net-snmp-config --default-mibdirs
> /root/.snmp/mibs:/usr/local/share/snmp/mibs
>
> > ls ~/.snmp/mibs/ | grep PEAXY
> PEAXY-SNMP-MIB.txt
>
> > ls /usr/local/share/snmp/mibs/ | grep PEAXY
> PEAXY-SNMP-MIB.txt
>
> #### Start MIB ####
>
> PEAXY-SNMP-MIB DEFINITIONS ::= BEGIN
>
> -- Peaxy Inc.
> -- Author: Erik Q. Steggall
>
> --
> -- IMPORTS: Include definitions from other mibs here
> --
> IMPORTS
> netSnmpExamples FROM NET-SNMP-EXAMPLES-MIB
> OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY,
> Integer32, Opaque, enterprises, Counter32, Unsigned32
> FROM SNMPv2-SMI
> MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF
>
> --
> -- A brief description and update info about this mib
> --
>
> pxeSnmpMib MODULE-IDENTITY
> LAST-UPDATED "201505050000Z"
> ORGANIZATION "Peaxy Inc"
> CONTACT-INFO "Postal: Erik Steggall
> 2380 Bering Dr,
> San Jose, CA, 95131
> email: estegg...@peaxy.net
> "
> DESCRIPTION "An MIB for Peaxy Inc."
> ::= { enterprises 45190 }
>
> --
> -- Define typical mib nodes
> --
> pxeMIBObjects OBJECT IDENTIFIER ::= { pxeSnmpMib 1 }
> pxeMIBConformance OBJECT IDENTIFIER ::= { pxeSnmpMib 2 }
>
> --
> -- define objects
> --
>
> pxeAgentModules OBJECT IDENTIFIER ::= { pxeMIBObjects 1 }
>
> pxeAgentModuleObject OBJECT-TYPE
> SYNTAX Integer32
> MAX-ACCESS read-write
> STATUS current
> DESCRIPTION
> "This is an int to test snmp for PEAXY"
> DEFVAL { 1 }
> ::= { pxeAgentModules 1 }
>
> pxeAgentTestString OBJECT-TYPE
> SYNTAX OCTET STRING
> MAX-ACCESS read-write
> STATUS current
> DESCRIPTION
> "This is a demo string, should hold PEAXY"
> DEFVAL { 2 }
> ::= { pxeMIBObjects 2 }
>
> END
>
> #### End MIB ####
>
> best,
>
> - Erik S.
> (530)400-6194
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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/listinfo/net-snmp-users