vaping.plugins.fping

Classes


FPing

FPing(vaping.plugins.fping.FPingBase)

Run fping on configured hosts

Config

  • command (str=fping): command to run
  • interval (str=1m): time between pings
  • count (int=5): number of pings to send
  • period (int=20): time in milliseconds that fping waits between successive packets to an individual target

Methods

init

def init(self)

called after the plugin is initialized, plugin may define this for any other initialization code


probe

def probe(self)

probe for data, return a list of dicts


FPingBase

FPingBase(vaping.plugins.TimedProbe)

FPing base plugin

config:

Config

  • command (str=fping): command to run
  • interval (str=1m): time between pings
  • count (int=5): number of pings to send
  • period (int=20): time in milliseconds that fping waits between successive packets to an individual target

Instanced Attributes

These attributes / properties will be available on instances of the class

  • count (int): number of fpings to send
  • period (int): time in milliseconds that fping waits between successive packets

Methods

__init__

def __init__(self, config, ctx)

Arguments

  • config (dict)
  • ctx: vaping context

hosts_args

def hosts_args(self)

hosts list can contain strings specifying a host directly or dicts containing a "host" key to specify the host

this way we can allow passing further config details (color, name etc.) with each host as well as simply dropping in addresses for quick setup depending on the user's needs


parse_verbose

def parse_verbose(self, line)

parse output from verbose format

Returns

parsed fping result (dict)

  • host: host name
  • cnt: fpings sent
  • loss
  • data: list of inidivual fping times
  • min: smallest fping time
  • max: biggest fping time
  • avg: average fping time
  • last: last fping time