RE: sending traps from embedded AgentX subagent
"David Arthur" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <002301c71f9b$4e425370$500010ac@gx520> |
Thanks for the response Dave, Very sorry...The EGP neighbor loss *IS* the cold start trap I mistakenly referred to that I want to get from the subagent. I used EGP trap so I could tell it apart from the master cold start trap easily. The send_easy_trap(5, 0) call is made after the init_xxx() calls and the agent processing loop is started. (The processing loop for GET/SET is running on its own thread at that point.) Regards, Dave Arthur -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield Sent: Thursday, December 14, 2006 10:09 AM To: David Arthur Cc: [email protected] Subject: Re: sending traps from embedded AgentX subagent On 14/12/06, David Arthur <[email protected]> wrote: > I am unable to get traps from an embedded subagent. > init_agent("agentSNMPAlert"); // init agent library > init_agentSNMPAlert(); // run MIB module init > init_snmp("agentSNMPAlert"); // init SNMP library > > // My subagent processing loop (gets started on its own thread) > while(!bSNMPShutdown){ // While SNMP is running, > agent_check_and_process(1); // process SNMP gets/sets > } > snmp_shutdown("agentSNMPAlert"); // Shutdown the subagent > SOCK_CLEANUP; // Clean up after socket > > // My attempt to send a trap: > send_easy_trap(5, 0); // Send EGP neighbor loss In this code, the trap is only sent when the subagent has finished running. (And probably after the connection to the master agent has been deleted), This would explain why the EGP neighbour loss trap is not sent out. > I do get the cold start trap from the Net-SNMP master agent, but not from my > embedded subagent. But where in this code is the coldStart trap to be generated? There's no mention of it at all, as far as I can see. 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