On 27/07/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Iam trying to understand how the disman/event module sends notifications
> to manager without completely starting the agent process.
>
> i.e I get a disman event notifications first at the manager before the
> coldstart trap of the net-snmp master agent.
That's because sending the coldStart trap is pretty much the last
thing that the agent does before settling down to answer incoming
requests. From agent/snmpd.c:main():
SOCK_STARTUP;
init_agent(app_name); /* do what we need to do first. */
init_mib_modules();
init_snmp(app_name);
snmp_store(app_name);
send_easy_trap(0, 0);
receive(); /* 'infinite' loop */
Setting up a monitor entry is handled in
agent/mibgroup/disman/event/mteTriggerConf.c
In particular, parse_mteMonitor() sets up the entry, and finished with the call:
snmp_register_callback(SNMP_CALLBACK_LIBRARY,
SNMP_CALLBACK_POST_READ_CONFIG,
_mteTrigger_callback_enable, entry );
This is triggered by the 'init_snmp' call above, and invokes mteTrigger_enable()
(in mteTrigger.c), which calls mteTrigger_run(), which invokes an
internal query to retrieve the necessary information, and decide
whether to send a notification.
By this point, the agent is basically fully set up and ready to go -
it just hasn't entered the main receive loop (or sent the coldStart
trap).
> Does anyone have an understanding of the flow how exactly disman sends
> notifications before the master
Does that answer your question?
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