Reconnect subagent automatically

"Rajaa, Mukuntha (Nokia - IN/Bangalore)" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <DB6PR07MB429603C623BC0EF2EABA35A995F40@DB6PR07MB4296.eurprd07.prod.outlook.com>
Hi,


I am using subagent mainly for "traps". So I am not using "agent_check_and_process". From what I understand, "agent_check_and_process" polls on to the connection between snmpd and subagent for any incoming request. My subagent is not serving any request at all. So I have skipped this function check at all.


So whenever master-agent (snmpd ) gets restarted, subagent isnt re-establishing the connection. My code snippet is something like this,


    while ( whatever )

    {

        wait_for_events_to_arrive_in_pipe(); // blocks on read-system call

    }


Currently I am hooking up netsnmp init script ( yes I am working on legacy system. No systemd ) to restart my subagent too. I am not too happy with this method. Is there an advisable way in doing so.



Regards,

Mukunth

_______________________________________________
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.