RE: mechanism for sending periodic traps?

This is a discussion on RE: mechanism for sending periodic traps? within the SNMP Coders forums, part of the Networking and Network Related category; > I am attempting to extend net-snmp as an application monitoring tool,=20 > and am running into a ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-14-2005
Brennan, Thomas J
 
Posts: n/a
Default RE: mechanism for sending periodic traps?


> I am attempting to extend net-snmp as an application monitoring tool,=20
> and am running into a problem:
>=20
> Is there a simple way to get net-snmp to send dynamically configured=20
> periodic traps? In other words, for any registered variable in the=20
> agent, I want to be able to have the variable sent to a trap sink at a


> configurable time interval, and I want to trigger/de-trigger which=20
> variables get sent while the agent is running. I am only interested

in=20
> doing this for explicitly specified variables (e.g. via SNMP_MSG_GET,=20
> not *_GETNEXT).
>=20


What I've done to make this happen is to use the snmp_alarm_register()
mechanism to get called back when it is time to send a trap.
Here's a code fragment that's invoked whenever the update interval is
set/changed:
/* Unregister before updating */
if ( pApp->hHeartBeatAlarm > 0 )=20
snmp_alarm_unregister( pApp->hHeartBeatAlarm );
pApp->hHeartBeatAlarm =3D snmp_alarm_register( iVal, SA_REPEAT,
SendHeartBeatTrap, pApp );

where SendHeartBeatTrap() is my function that builds the trap vars and
then calls send_enterprise_trap_vars() to send the trap.






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:20 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0