package Smokeping::probes::RemoteFPing; =head1 301 Moved Permanently This is a Smokeping probe module. Please use the command C to view the documentation or the command C to generate the POD document. =cut sub pod_hash { return { name => < < must point to your copy of the ssh/rsh program. The variable B must point to your copy of the fping program at the remote end. DOC notes => <<'DOC', It is important to make sure that you can access the remote machine without a password prompt, otherwise this probe will not work properly. To test just try something like this: $ ssh foo@HostA.foobar.com fping HostB.barfoo.com The next thing you see must be fping's output. The B, B and B variables used to be configured in the Targets section of the first target or its parents They were moved to the Probes section, because the variables aren't really target-specific (all the targets are measured with the same parameters). The Targets sections aren't recognized anymore. DOC authors => <<'DOC', Luis F Balbinot Niko Tyni derived from Smokeping::probes::FPing by Tobias Oetiker DOC bugs => <SUPER::ProbeDesc; return "Remote $superdesc"; } sub binary { my $self = shift; my @ret = ( $self->SUPER::binary ); for my $what (qw(ruser rhost rbinary)) { my $prefix = ($what eq 'ruser' ? "-l" : ""); if (defined $self->{properties}{$what}) { push @ret, $prefix . $self->{properties}{$what}; } } return @ret; } sub probevars { my $class = shift; my $h = $class->SUPER::probevars; $h->{rbinary} = $h->{binary}; delete $h->{binary}; delete $h->{rbinary}{_sub}; # we can't check the remote program's -x bit @{$h->{_mandatory}} = map { $_ ne 'binary' ? $_ : 'rbinary' } @{$h->{_mandatory}}; return $class->_makevars($h, { _mandatory => [ 'binary', 'rhost' ], binary => { _doc => < '/usr/bin/ssh', _sub => sub { my $val = shift; -x $val or return "ERROR: binary '$val' is not executable"; return undef; }, }, rhost => { _doc => < option specifies the remote device from where fping will be launched. DOC _example => 'my.pinger.host', }, ruser => { _doc => < option allows you to specify the remote user, if different from the one running the smokeping daemon. DOC _example => 'foo', }, }); } 1;