Re: sending traps from embedded AgentX subagent

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.