oetiker/SmokePing

SSH Probe doesn't allow the protocol to be set (ipv4/ipv6)

Closed this issue · 3 comments

The SSH probe that runs ssh-keyscan doesn't have a protocol option to specify whether to use IPv4 only or IPv6 only. This means that probes to a SSH host may flap between protocols if a DNS name is used on dual stack machines. The ability to clearly identify the performance and availability of services on the ipv4/ipv6 is an issue.

When ssh-keyscan is run without a -4 or a -6 option, it seems to only try ipv6 names and then times out before failing over to ipv4.

Rational: I'm having problem with ipv6 connectivity to bitbucket.org, which limits my ability to access git repositories. I'm trying to monitor this using smokeping. I want to monitor ipv4 and ipv6 performance independently and explicitly. For now the workaround is to use the fping probe.

I ran into this as well last week, however in our case the automation that generates our smokeping config happens to put IPV4 and IPv6 literals as the host= value (and the automation keeps it in sync). However, I think this option is worth passing through so I will look at a PR for this, I did look at the code some last week.

@oetiker please see the linked PR to add this feature - feedback welcome. I do not see a general way in the smokeping config syntax to say "stop inheriting this variable from parent sections", so I added a pseudo-value to this feature. This way if a parent section says "Use IPv4, pass -4 to ssh-keyscan" but a child section should use the default system preference/behavior, they can set the variable to 0 (in which case neither -4 nor -6 will be passed)

This issue has become stale and will be closed automatically within 7 days. Comment on the issue to keep it alive.