On Mon, 2006-02-13 at 14:39 +0530, Jobin Jose Sebastin wrote:

> #snmpget -v2c -c public  localhost
>            NET-SNMP-TUTORIAL-MIB::nstAgentPluginObject.0
> 
> shows
> 
> NET-SNMP-TUTORIAL-MIB::nstAgentPluginObject.0:
>            Unknown Object Identifier

That is an error from the snmpget client (I think),
indicating that it can't interpret the OID - it doesn't
know what to ask for.  This is completely independent of
whether the agent has loaded this module correctly or not.
It's never getting asked, so you won't find out.

Try using the numeric OID in the snmpget request.


>  I have included the directive 

> dlmod nstAgentPluginObject
>      /home/jobins/snmp-project/mibs/nstAgentPluginObject.so
> 
> under the section extensible sections...

That looks OK at first glance.

> (otherwise in which portion to include this...?)

It doesn't matter.   In general, the config files are
(mostly) unstructured as far as the agent is concerned.
The organisation described by the comments in the example
configs are really for human benefit - gathering related
settings together so that they're easier to understand.
The agent doesn't care.



> i have set
> 
> MIBS=+NET-SNMP-TUTORIAL-MIB
> 
> MIBSDIR=+/jome/jobins/snmp-project/mibs ...
>    ->the directory where the NET-SNMP-TUTORIAL-MIB is lying

The second environment variable should be MIBDIRS=....
(not MIBSDIR).   That might explain why snmpget isn't
finding the MIB file.

Plus there appears to be a typo in this value (jome, not home).
I assume you did "export" these two variables as well?


> does it really needed......?

If you are referring to NET-SNMP-TUTORIAL-MIB::something,
then you don't need to set the variable MIBS.
If MIBS is set as above, then you don't need to list
NET-SNMP-TUTORIAL-MIB:: in the snmpget command.
   These are two alternative ways of doing the same thing.


You *do* need the MIBDIRS setting, unless you copy the
NET-SNMP-TUTORIAL-MIB.txt file to a directory in the
standard search list.  (Typically something like
/usr/local/share/snmp/mibs)



> and i have configured the snmpd.conf so that to grant
> the correct access control for the added module... like this

> view    systemview    included
>   
> .iso.org.dod.internet.private.enterprises.netSnmp.netSnmpExamples.netSnmpTutorialMIB
> 
> or i have to give it in any other way?

No - that should be fine.
(The name of the view is misleading, but the agent won't care)

I presume you have got the other necessary access settings
(com2sec, group and access).


> but if i am giving 
>
> snmpget -v2c -c public localhost netSnmpExample.nstAgentPluginObject.0
>
> it will give the value of the object...

Errr...
If you're getting the value of the object, then what's the problem?




> In the NET-SNMP-EXAMPLES-MIB.txt (included in the default
>  mibs associated with the net-snmp tool)

> --netSnmpTutorial      OBJECT IDENTIFIER ::= { netSnmpExamples 4 }
> 
> why this line is commented...anything to be done with this?

Don't worry about that.   It's just a placeholder, to remind us
that this particular slot is being used.  It's basically equivalent
to the MODULE IDENTITY definition in the tutorial MIB itself.

The MIBs are fine - don't worry about them.
Concentrate on the suggestions above.


Dave


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to