Re: AgentX reconnect time

Anders Wallin <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAF2baFcG2=9EPhxpYn+7m+=NtYdF+G5mwzOL5yEN6Y+db4SX4g@mail.gmail.com>
Hi Mostafa,

you need to set it in the config file for your agentx(e.g agentx.conf), not
in snmpd.conf
Regards
Anders Wallin


On Thu, Feb 21, 2019 at 1:22 AM Mostafa Kassem <[email protected]>
wrote:

> When we restart the snmpd, the agent detects that the snmpd is no longer
> running and disconnects, waits 15 seconds and then connects to the snmpd
> again.
>
>  AgentX master disconnected us, reconnecting in 15
>
>
>
> I would like to reduce this time to 5 seconds.
>
>
>
> Is this time specifieded in agentXPingInterval  as described here?
> http://www.net-snmp.org/docs/man/snmpd.conf.html
>
>
>
> However if I add agentXPingInterval 5 to the snmpd.conf file, I get this
> error:
>
> /var/snmp/snmpd.conf: line 35: Warning: Unknown token:agentXPingInterval.
>
>
>
> I found this code in agentx_config.c which leads me to believe that this
> value is hardcoded and not set in any configuration file. So changing it
> requires editing and recompile of the code.
>
>
>
> #ifdef USING_AGENTX_SUBAGENT_MODULE
>
>     /*
>
>      * tokens for master agent
>
>      */
>
>     if (SUB_AGENT == agent_role) {
>
>         /*
>
>          * set up callbacks to initiate master agent pings for this
> session
>
>          */
>
>         netsnmp_ds_register_config(ASN_INTEGER,
>
>
> netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID,
>
>                                    NETSNMP_DS_LIB_APPTYPE),
>
>                                    "agentxPingInterval",
>
>                                    NETSNMP_DS_APPLICATION_ID,
>
>                                    NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL);
>
>         /* ping and/or reconnect by default every 15 seconds */
>
>         netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID,
>
>                            NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 15);
>
>
>
>     }
>
> #endif /* USING_AGENTX_SUBAGENT_MODULE */
>
>
>
> Thanks,
>
>
>
> Mostafa
> _______________________________________________
> 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
>

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