Re: How to register our own application with snmptrapd?
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 01/08/06, <[email protected]> wrote: > I had an application which want the data/traps to be cpatured sent by the > SNMP devices proactively. The snmptrapd.conf is configured but the data > parsed by the snmptrapd deamon should be sent to my custom application. I'd suggest writing a suitable handler script, to forward these traps to your custom application, and registering this using "traphandle". (See snmptrapd.conf(5)). If your application can read traps from standard input (in the defined format), then this could even invoke your application directly. Otherwise, you'd need to have a suitable interface script. Another possibility would be to write an equivalent internal trap handler to pass these traps on to your application (using whatever API is most suitable). There's less documentation on how to do this, and it would require adding code to snmptrapd and recompiling - but it might prove more efficient in the long run. > I want to know whether there is any standard methods to register our own > application with snmptrapd deamon or not. Either use a 'traphandle' script, or write an internal trap handler. See forward_handler() and parse_forward() (both in apps/snmptrapd_handlers.c) for an example of this latter approach. Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ 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