Documentation ¶
Index ¶
- type HTTPGet
- func (p *HTTPGet) AddTarget(name string, url string, srcAddr string, proxy string, ...) (err error)
- func (p *HTTPGet) AddTargetDelayed(name string, urlStr string, srcAddr string, proxy string, ...) (err error)
- func (p *HTTPGet) AddTargets()
- func (p *HTTPGet) DelTargets()
- func (p *HTTPGet) ExportLabels() map[string]map[string]string
- func (p *HTTPGet) ExportMetrics() map[string]*http.HTTPReturn
- func (p *HTTPGet) RemoveTarget(key string)
- func (p *HTTPGet) Stop()
- type MTR
- func (p *MTR) AddTarget(name string, host string, srcAddr string, labels map[string]string) (err error)
- func (p *MTR) AddTargetDelayed(name string, host string, srcAddr string, labels map[string]string, ...) (err error)
- func (p *MTR) AddTargets()
- func (p *MTR) CheckActiveTargets() (err error)
- func (p *MTR) DelTargets()
- func (p *MTR) ExportLabels() map[string]map[string]string
- func (p *MTR) ExportMetrics() map[string]*mtr.MtrResult
- func (p *MTR) RemoveTarget(key string)
- func (p *MTR) Stop()
- type PING
- func (p *PING) AddTarget(name string, host string, ip string, srcAddr string, labels map[string]string) (err error)
- func (p *PING) AddTargetDelayed(name string, host string, ip string, srcAddr string, labels map[string]string, ...) (err error)
- func (p *PING) AddTargets()
- func (p *PING) CheckActiveTargets() (err error)
- func (p *PING) DelTargets()
- func (p *PING) ExportLabels() map[string]map[string]string
- func (p *PING) ExportMetrics() map[string]*ping.PingResult
- func (p *PING) RemoveTarget(key string)
- func (p *PING) Stop()
- type TCPPort
- func (p *TCPPort) AddTarget(name string, host string, ip string, srcAddr string, port string, ...) (err error)
- func (p *TCPPort) AddTargetDelayed(name string, host string, ip string, srcAddr string, port string, ...) (err error)
- func (p *TCPPort) AddTargets()
- func (p *TCPPort) CheckActiveTargets() (err error)
- func (p *TCPPort) DelTargets()
- func (p *TCPPort) ExportLabels() map[string]map[string]string
- func (p *TCPPort) ExportMetrics() map[string]*tcp.TCPPortReturn
- func (p *TCPPort) RemoveTarget(key string)
- func (p *TCPPort) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPGet ¶
type HTTPGet struct {
// contains filtered or unexported fields
}
HTTPGet manages the goroutines responsible for collecting HTTPGet data
func NewHTTPGet ¶
NewHTTPGet creates and configures a new Monitoring HTTPGet instance
func (*HTTPGet) AddTarget ¶
func (p *HTTPGet) AddTarget(name string, url string, srcAddr string, proxy string, labels map[string]string) (err error)
AddTarget adds a target to the monitored list
func (*HTTPGet) AddTargetDelayed ¶
func (p *HTTPGet) AddTargetDelayed(name string, urlStr string, srcAddr string, proxy string, labels map[string]string, startupDelay time.Duration) (err error)
AddTargetDelayed is AddTarget with a startup delay
func (*HTTPGet) AddTargets ¶
func (p *HTTPGet) AddTargets()
AddTargets adds newly added targets from the configuration
func (*HTTPGet) DelTargets ¶
func (p *HTTPGet) DelTargets()
DelTargets deletes/stops the removed targets from the configuration
func (*HTTPGet) ExportLabels ¶
ExportLabels target labels
func (*HTTPGet) ExportMetrics ¶
func (p *HTTPGet) ExportMetrics() map[string]*http.HTTPReturn
Export collects the metrics for each monitored target and returns it as a simple map
func (*HTTPGet) RemoveTarget ¶
RemoveTarget removes a target from the monitoring list
type MTR ¶
type MTR struct {
// contains filtered or unexported fields
}
MTR manages the goroutines responsible for collecting MTR data
func NewMTR ¶
func NewMTR(logger log.Logger, sc *config.SafeConfig, resolver *config.Resolver, icmpID *common.IcmpID, ipv6 bool) *MTR
NewMTR creates and configures a new Monitoring MTR instance
func (*MTR) AddTarget ¶
func (p *MTR) AddTarget(name string, host string, srcAddr string, labels map[string]string) (err error)
AddTarget adds a target to the monitored list
func (*MTR) AddTargetDelayed ¶
func (p *MTR) AddTargetDelayed(name string, host string, srcAddr string, labels map[string]string, startupDelay time.Duration) (err error)
AddTargetDelayed is AddTarget with a startup delay
func (*MTR) AddTargets ¶
func (p *MTR) AddTargets()
AddTargets adds newly added targets from the configuration
func (*MTR) CheckActiveTargets ¶
Read target if IP was changed (DNS record)
func (*MTR) DelTargets ¶
func (p *MTR) DelTargets()
DelTargets deletes/stops the removed targets from the configuration
func (*MTR) ExportLabels ¶
ExportLabels target labels
func (*MTR) ExportMetrics ¶
ExportMetrics collects the metrics for each monitored target and returns it as a simple map
func (*MTR) RemoveTarget ¶
RemoveTarget removes a target from the monitoring list
type PING ¶
type PING struct {
// contains filtered or unexported fields
}
PING manages the goroutines responsible for collecting ICMP data
func NewPing ¶
func NewPing(logger log.Logger, sc *config.SafeConfig, resolver *config.Resolver, icmpID *common.IcmpID, ipv6 bool) *PING
NewPing creates and configures a new Monitoring ICMP instance
func (*PING) AddTarget ¶
func (p *PING) AddTarget(name string, host string, ip string, srcAddr string, labels map[string]string) (err error)
AddTarget adds a target to the monitored list
func (*PING) AddTargetDelayed ¶
func (p *PING) AddTargetDelayed(name string, host string, ip string, srcAddr string, labels map[string]string, startupDelay time.Duration) (err error)
AddTargetDelayed is AddTarget with a startup delay
func (*PING) AddTargets ¶
func (p *PING) AddTargets()
AddTargets adds newly added targets from the configuration
func (*PING) CheckActiveTargets ¶
Read target if IP was changed (DNS record)
func (*PING) DelTargets ¶
func (p *PING) DelTargets()
DelTargets deletes/stops the removed targets from the configuration
func (*PING) ExportLabels ¶
ExportLabels target labels
func (*PING) ExportMetrics ¶
func (p *PING) ExportMetrics() map[string]*ping.PingResult
ExportMetrics collects the metrics for each monitored target and returns it as a simple map
func (*PING) RemoveTarget ¶
RemoveTarget removes a target from the monitoring list
type TCPPort ¶
type TCPPort struct {
// contains filtered or unexported fields
}
TCPPort manages the goroutines responsible for collecting TCP data
func NewTCPPort ¶
NewTCPPort creates and configures a new Monitoring TCP instance
func (*TCPPort) AddTarget ¶
func (p *TCPPort) AddTarget(name string, host string, ip string, srcAddr string, port string, labels map[string]string) (err error)
AddTarget adds a target to the monitored list
func (*TCPPort) AddTargetDelayed ¶
func (p *TCPPort) AddTargetDelayed(name string, host string, ip string, srcAddr string, port string, labels map[string]string, startupDelay time.Duration) (err error)
AddTargetDelayed is AddTarget with a startup delay
func (*TCPPort) AddTargets ¶
func (p *TCPPort) AddTargets()
AddTargets adds newly added targets from the configuration
func (*TCPPort) CheckActiveTargets ¶
Read target if IP was changed (DNS record)
func (*TCPPort) DelTargets ¶
func (p *TCPPort) DelTargets()
DelTargets deletes/stops the removed targets from the configuration
func (*TCPPort) ExportLabels ¶
ExportLabels target labels
func (*TCPPort) ExportMetrics ¶
func (p *TCPPort) ExportMetrics() map[string]*tcp.TCPPortReturn
ExportMetrics collects the metrics for each monitored target and returns it as a simple map
func (*TCPPort) RemoveTarget ¶
RemoveTarget removes a target from the monitoring list