ping

package
v0.0.0-...-c3423aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package ping is the ping probe package

Index

Constants

View Source
const DefaultLostThreshold = 0.0

DefaultLostThreshold is the default lost threshold - 0% lost

View Source
const DefaultPingCount = 3

DefaultPingCount is the default ping count

Variables

This section is empty.

Functions

This section is empty.

Types

type Ping

type Ping struct {
	base.DefaultProbe `yaml:",inline"`
	Host              string  `yaml:"host" json:"host" jsonschema:"required,title=Host,description=The host to ping"`
	Count             int     `yaml:"count" json:"count" jsonschema:"title=Count,description=The number of ping packets to send,minimum=1,default=3"`
	LostThreshold     float64 `` /* 128-byte string literal not displayed */
	Privileged        bool    `yaml:"privileged" json:"privileged" jsonschema:"title=Privileged,description=Run ping with privileged modem, default=false"`
	// contains filtered or unexported fields
}

Ping implements a config for ping

func (*Ping) Config

func (p *Ping) Config(gConf global.ProbeSettings) error

Config Ping Config Object

func (*Ping) DoProbe

func (p *Ping) DoProbe() (bool, string)

DoProbe return the checking result

func (*Ping) ExportMetrics

func (p *Ping) ExportMetrics(stats *ping.Statistics)

ExportMetrics export Ping metrics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL