maxwo / snmp_notifier

A webhook to relay Prometheus alerts as SNMP traps, because sometimes, you have to deal with legacy
Apache License 2.0
55 stars 33 forks source link

SNMP traps retry mechanism #186

Closed bmgante closed 1 month ago

bmgante commented 6 months ago

Hi Can someone explain how snmp retries mechanism works on snmp-notifier? If it uses udp how does it know if it should retry to resend the trap or does it somehow works over tcp? @maxwo could you please provide some further details on this?

--snmp.retries=1

Thanks for any information

maxwo commented 3 months ago

Hello, Basically, the retry is enabled on connection openings (eg. DNS error, etc.). So, indeed, there is no way to tell whether or not a trap is received because it works over UDP. If you need a way to retry the traps, your best bet is to configure the renotification feature on the alert manager side.