netping

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultIntervalSeconds = 60    // default interval
	MinIntervalSeconds     = 10    // min interval  seconds
	MaxIntervalSeconds     = 86400 // max interval seconds
	DefaultTimeoutSeconds  = 5     // default timeout is 5s
	MinTimeoutSeconds      = 1     // min timeout seconds
	MaxTimeoutSeconds      = 30    // max timeout seconds
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ICMPConfig

type ICMPConfig struct {
	Src    string `json:"src"`
	Target string `json:"target"`
	Count  int    `json:"count"`
}

type NetPing

type NetPing struct {
	TimeoutSeconds  int          `` /* 131-byte string literal not displayed */
	IntervalSeconds int          `` /* 157-byte string literal not displayed */
	ICMPConfigs     []ICMPConfig `` /* 132-byte string literal not displayed */
	TCPConfigs      []TCPConfig  `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

NetPing struct implements the MetricInput interface.

func (*NetPing) Collect

func (m *NetPing) Collect(collector ilogtail.Collector) error

Collect is called every trigger interval to collect the metrics and send them to the collector.

func (*NetPing) Description

func (m *NetPing) Description() string

func (*NetPing) Init

func (m *NetPing) Init(context ilogtail.Context) (int, error)

type Result

type Result struct {
	Valid       bool // if the result is meaningful for count
	Label       string
	Type        string
	Total       int
	Success     int
	Failed      int
	MinRTTMs    float64
	MaxRTTMs    float64
	AvgRTTMs    float64
	TotalRTTMs  float64
	StdDevRTTMs float64
}

type TCPConfig

type TCPConfig struct {
	Src    string `json:"src"`
	Target string `json:"target"`
	Port   int    `json:"port"`
	Count  int    `json:"count"`
}

Jump to

Keyboard shortcuts

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