Old variant `ping -c3 -w3` uses deadline 3 seconds for the whole program
running, for all pings with pause between sending pings and all.
If ping deadlines it will exit with value 1 and thus failing the check.
Sometimes the check fails even if the switch is up. This is probably
because of edge case how long the ping takes and possible the switch down
prioritizes ICMP packages.
In our case it doesn't really differs if the ping is a bit slower as
long as the switch is working.
This fix has been running last 24hours and seems to work. Effectively
each ping has up to 2 seconds to complete (but for the whole check).
Another possible fix is to use `-W` that set timeout per ping.