Closed MatthewHink closed 3 years ago
Timeout is already 30 seconds, which seems long enough https://github.com/vapor-ware/synse-snmp-plugin/blob/c48493944c227499963303b88088eadcbca5a44e/pkg/snmp/core/client.go#L123
We can add retries to GoSNMP.Retries. (Start with 3).
Yeah, I've always been torn on what the right behavior is for situations like this (e.g. keep retrying, chug along, fail fast, etc). I think what you're suggesting feels right though - add some retries, and then if that fails, we could exit the plugin on initialization failure. It seems like its better for it to go down than to keep running but not actually doing anything. Plus, since it should always be run with some sort of manager (systemd, kubernetes), it would get restarted, etc from that.
The connectivity to the Edens UPS is very poor right now. Even snmpwalk gives up with a timeout.
Problems: The SNMP plugin cannot read data and cannot initialize correctly. The plugin does not fail to initialize and exit, it just chugs along like it's working.
Possible Solutions: Could it be a bad network cable? Can we add retries and/or lengthen the network timeout? Exit the plugin on initialization failure.
Log snippet below. We should exit here: "failed to create table"