On 20 March 2012 16:58, Charlie Martin <crmar...@sgi.com> wrote:
> Ah, hell.  You know, trying to figure this stuff out from a standing start
> is like spending two months reading stereo instructions.

Which is why I tend to encourage people to walk for a while
(use the existing SNMP agent, and get a feel for how it all
works) before starting to run  (write code to extend it)



> Here are the OBJECT-TYPE entries for the first few of these things.  If
> these are wrong they're all going to be.  The file did pass smilint.
>
>
> partNumber OBJECT-TYPE
>    SYNTAX  DisplayString
>    MAX-ACCESS read-only
>    STATUS  current
>    DESCRIPTION
>        "SGI part number."
>    -- 1.3.6.1.4.1.59.1.5.3.1.1.2
>    ::= { sgiStorageCopanSystem 2 }

You've omitted the definition of 'sgiStorageCopanSystem'
but it looks as if these are all scalar objects rather than
part of a table.   Yes?

In which case the only thing that's wrong is that you're
missing the .0 at the end of each varbind returned from
the agent.

The OID of the 'partNumber' object is 1.3.6.1.4.1.59.1.5.3.1.1.2
but the OID of the (sole) *instance* of this (scalar) object is
1.3.6.1.4.1.59.1.5.3.1.1.2.0

If you tweak your script to look for (and return) this longer OID,
then everything should be fine.
   (There are some subtler issues relating to the appropriate
error to return for invalid GET requests, but concentrate on
the core behaviour first)

Dave

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to