Upgrade go-agentx to v0.3.0, containing my ordering fix

This commit is contained in:
Pim van Pelt
2025-11-21 10:08:23 +01:00
parent a0d5c61643
commit b6d2e3b629
6 changed files with 27 additions and 23 deletions

View File

@@ -31,12 +31,13 @@ func StartAgentXRoutine(interfaceMIB *ifmib.InterfaceMIB) error {
logger.Debugf("Connecting to AgentX at %s://%s", network, address)
client, err := agentx.Dial(network, address)
client, err := agentx.Dial(network, address,
agentx.WithTimeout(1*time.Minute),
agentx.WithReconnectInterval(1*time.Second),
)
if err != nil {
return err
}
client.Timeout = 1 * time.Minute
client.ReconnectInterval = 1 * time.Second
// Register the interface MIB with the AgentX client
if err := interfaceMIB.RegisterWithClient(client); err != nil {