$dest is extracted from my $dest = $target->{vars}{host};
Here are the relevant lines from my config:
+ Junos
probe = OpenSSHJunOSPing
host = www.bbc.co.uk
Here is the command-line output from my Juniper router (it's an SRX210):
Admin@router> ping www.bbc.co.uk
PING www.bbc.net.uk (212.58.246.93): 56 data bytes
64 bytes from 212.58.246.93: icmp_seq=0 ttl=55 time=12.369 ms
64 bytes from 212.58.246.93: icmp_seq=1 ttl=55 time=12.724 ms
64 bytes from 212.58.246.93: icmp_seq=2 ttl=55 time=12.734 ms
^C
Please note: the hostname is changed in the first line of the output (now www.bbc.net.uk) and also the output in the command is the numeric IP address.
Here's the match string from OpenSSHJunOSPing.pm:
/^\d+ bytes from $dest: icmp_seq=\d+ ttl=\d+ time=(\d+\.\d+) ms$/ and push @times,$1
$dest isn't going to match in the output, because the numeric IP of the "host" field has been substituted.
Unfortunately the numeric IP address will change often since high-volume websites rotate around a number of valid IP addresses. And it's not safe to pick a singe IP as it may be taken out of the cluster for maintenance. So, specifying the IP address in the "host" field in the config file is not a good plan.
Since the match isn't captured, it would probably be OK to check for any IP address at this position in the output, unless this probe type supports multiple overlapping probes somehow (doesn't look likely).
For now, I'm going to cheat horribly, since this is in my own test lab, and not in production:
OpenSSHJunOSPing.pm, line 21 changed to:
/^\d+ bytes from [0-9.]+: icmp_seq=\d+ ttl=\d+ time=(\d+\.\d+) ms$/
This works OK.
The preferred match for an IP address would be
(from O'Reilly's Mastering Regular Expressions):
m/^([01]?\d\d?|2[0-4]\d|25[0-5]).([01]?\d\d?|2[0-4]\d|25[0-5]).
([01]?\d\d?|2[0-4]\d|25[0-5]).([01]?\d\d?|2[0-4]\d|25[0-5])$/;
but this is overkill for the job at hand, I think.