Documentation ¶
Index ¶
Constants ¶
View Source
const ( PingTypeIcmp = "ping" PingTypeTcping = "tcping" PingTypeHttping = "httping" DefaultIntervalSeconds = 60 // default interval MinIntervalSeconds = 5 // 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 HTTPConfig ¶ added in v1.1.0
type ICMPConfig ¶
type NetPing ¶
type NetPing struct { DisableDNS bool `json:"disable_dns_metric" comment:"disable dns resolve metric, default is false"` TimeoutSeconds int `` /* 131-byte string literal not displayed */ IntervalSeconds int `` /* 156-byte string literal not displayed */ ICMPConfigs []ICMPConfig `` /* 132-byte string literal not displayed */ TCPConfigs []TCPConfig `` /* 149-byte string literal not displayed */ HTTPConfigs []HTTPConfig `json:"http" comment:"the http config list, example: {\"src\" : \"${IP_ADDR}\", \"target\" : \"${http url}\"}"` // contains filtered or unexported fields }
NetPing struct implements the MetricInput interface.
func (*NetPing) Collect ¶
Collect is called every trigger interval to collect the metrics and send them to the collector.
func (*NetPing) Description ¶
type ResolveResult ¶ added in v1.1.0
type Result ¶
type Result struct { Valid bool // if the result is meaningful for count Label string Type string Total int Success int Failed int // valid for icmping/tcping MinRTTMs float64 MaxRTTMs float64 AvgRTTMs float64 TotalRTTMs float64 StdDevRTTMs float64 // valid for httping HTTPRTMs int HTTPResponseSize int HasHTTPSCert bool HTTPSCertLabels string HTTPSCertTTLDay int }
Click to show internal directories.
Click to hide internal directories.