wernerfred / check_synology

This plugin will check a lot of different values on your Synology DiskStation.
MIT License
17 stars 25 forks source link

Improve error message when SNMP connection fails by including hostname #24

Closed amotl closed 2 years ago

amotl commented 2 years ago

Dear Frederic,

based on the last comment of our discussion over at https://github.com/wernerfred/check_synology/pull/20#discussion_r825302032, I figured it would be a good idea to actually try to connect to a hostname which does not resolve.

With this patch, check_synology responds with

Could not connect to SNMP at synology.example.org. Reason: couldn't create SNMP handle

This allows the user to more easily figure out to put in a correct address there.

With kind regards, Andreas.