Re: example and notification problems

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAKoMtGb2-tscbHUbQ_tn4MtW=+42DiJ=g+uGnANLMHb6cnG=4g@mail.gmail.com>
On 8 November 2011 23:51, Anthony Jiang <[email protected]> wrote:
> 1 ./configure --with-mib-modules="examples/example" doesn't work.
>     with this configuration, I still can't retrieve the value in
> NET-SNMP-EXAMPLES-MIB.txt modules

Correct.
The code in 'examples/example'  dioesn't refer to NET-SNMP-EXAMPLES-MIB
It's actually registering objects within the ucdavis.254 subtree.


> such as netSnmpExampleInteger.

>From the definition of netSnmpExampleInteger:

         This example object is implemented in the
         agent/mibgroup/examples/scalar_int.c file.


> And How can I know what mib modules have been compiled into the snmpd agent?

Try retrieving   UCD-SNMP-MIB::versionConfigureOptions.0
    (which will tell you what options were used when compiling the agent)
or walk the NET-SNMP-AGENT-MIB::nsModuleName object
   which will tell you which modules are registered.
The structure of this latter output is not ideal, but it should
give the necessary information



> 2. Does snmpd support sending SNMPv3 notifications?

Yes.

There's documentation on sending SNMPv3 notification (using snmptrap)
at http://www.net-snmp.org/wiki/index.php/TUT:snmptrap_SNMPv3
and receiving them (using snmptrapd) at
http://www.net-snmp.org/wiki/index.php/TUT:Configuring_snmptrapd_to_receive_SNMPv3_notifications

Sending v3 traps from the agent is similar to 'snmptrap'
but using the 'trapsess' config directive with the same parameters.
I don't believe we have an particular documentation on this,
but it would be sensible to start with the snmptrap setup first.



> After reading the manual, it seems that it only sends SNMPv2 traps.

I'm not sure what gives you that impression.   v1 and v2 traps are certainly
easier to set up, but it definitely support v3 traps as well.
>From 'snmpd.conf(5)':

       trapsess [SNMPCMD_ARGS] HOST
              provides  a more generic mechanism for defining
notification destinations....

              This is the appropriate directive for defining SNMPv3
trap  receivers.
              See
http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptrap-v3.html
              for more information about SNMPv3 notification behaviour.


Dave

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.