logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: SNMP notifications: msg#00293

Subject: Re: SNMP notifications
> Thanks for the reply, Dave.  I would upgrade to 5.1 but my
> project is nearing release date.

That's fair enough.
The end of a project is not exactly the best time to consider
a major upgrade!


> I have used the "--with-out-mib-modules=" option to exclude
> the notifications module from the build process.

OK - that's the cause of our different experiences, then.
I've tended to run with the standard agent, *including* the
notification module.   Which is why I haven't see the problem
you mention.



> When you refer to the default configuration, I am assuming
> this is the trap settings present in the snmpd.conf file?

No - I meant the compile-time configuration.
I.e. the options to "configure".
If you're omitting the notification module, that would explain things.


> Is is a bad idea to be configuring trap destinations solely
> through the mechanisms of the snmpd.conf config file?

Not inherently a bad thing - just less flexible than using the
notification module (which allows things to be set via SNMP as well).
If you don't need this functionality, then that's fine.


> Would it be feasible for me to just upgrade the trap handling files
> from 5.1 in order to get the desired functionality of sending
> v1 or v2 formatted traps to the configured sinks?

That's certainly one possibility.
(The other being to always send traps using the v1-style, and let
 the agent trap handler upgrade them as necessary).

> The agent_trap.c file seems to be the main file for trap handling.
> Would it be this simple?  

It should be, yes.
In particular, if you extract the four routines:

        find_varbind_in_list
        convert_v2pdu_to_v1
        convert_v1pdu_to_v2
and     netsnmp_send_traps

(lines 287-702) from the 5.1 codebase, and insert them into the
5.0.x agent_trap.c file (replacing the earlier versions), you should
find that things work properly.

Note that I haven't tried this, of course, and the new 5.1 trap
handling hasn't had much public exposure yet.  But it ought to be
a rather cleaner model than before.

That relies on you being able to make this change on all the relevant
agent systems, of course.  The alternative approach of always specifying
traps using v1 syntax would work with a vanilla 5.0.x agent.  I don't
know whether this is a concern for you?

Dave



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/


<Prev in Thread] Current Thread [Next in Thread>