[smokeping-users] Fping Probe Target Variables

Niko Tyni ntyni+smokeping-users at mappi.helsinki.fi
Tue Mar 25 15:30:27 CET 2008


On Tue, Mar 25, 2008 at 01:56:36PM +1030, Ben Ragg wrote:
 
> We've got to a stage where the normal TelnetIOS just isn't working on 
> our setup. We have a number of routers on our network, and graph the 
> pings from each router to a number of other routers on our network. 
> We're now hitting the point where TelnetIOS is forking off one process 
> per ping and chewing up all the vty's on that particular router.
> 
> I would like to rewrite TelnetIOS to be able to handle multiple pings in 
> one telnet session in a similar way to FPing/RemoteFPing. However I'm 
> currently stuck on one small point. How do I access the individual 
> target variables? "sub ping" is only called with one arguement, rather 
> than two in the case of "sub pingone" and while the entire config is 
> available with $self there doesn't seem to be a clean way of accessing 
> the target variables for each target when using the Fping module. 
> (Wondering if this wasn't thought of with FPing, since it's only 
> possible to set variables affecting all hosts that are being pinged, but 
> then surely this must be fixed with RemoteFPing to allow pings from 
> multiple hosts?)

Hi,

first, please read the smokeping_extend document if you haven't done
so yet.

The TelnetIOSPing probe is currently derived from 'basefork', which
means that it will ping each target in a separate process.

Conversely, the FPing and RemoteFPing probes are derived from 'base',
which doesn't allow target-specific variables at all. All hosts
monitored with a RemoteFPing probe are pinged from the same host,
defined by the 'rhost' probe-specific variable.

I think what you want can be achieved by deriving the new TelnetIOSPing
probe from 'basevars' instead of 'basefork': this is a base class that
offers target-specific variables but not the framework that forks the
separate processes. This provides the 'targets' method to access the
target-specific variables. See the Smokeping::probes::basevars document.

None of the existing probes do this, so you'll probably have to dig
in the source a bit. Please ask if you need clarification.

Hope this helps,
-- 
Niko



More information about the smokeping-users mailing list