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
Class Attributes
- ConfigSchema (
FPingSchema Class
): Base plugin config schema
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 namecnt
: fpings sentloss
data
: list of inidivual fping timesmin
: smallest fping timemax
: biggest fping timeavg
: average fping timelast
: last fping time
FPingSchema
FPingSchema(vaping.plugins.TimedProbeSchema)
Define a schema for FPing and also define defaults.
Class Attributes
- command (
Str Instance
): Command to run - count (
Int Instance
): Number of pings to send - interval (
Str Instance
): Time between pings - output (
List Instance
): Determine what plugin displays output - period (
Int Instance
): Time in milliseconds that fping waits between successive packets to an individual target