networkpath

package
v0.0.0-...-3d9a706 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package networkpath defines the agent corecheck for the Network Path integration

Index

Constants

View Source
const CheckName = "network_path"

CheckName defines the name of the Network Path check

Variables

This section is empty.

Functions

func Factory

func Factory() optional.Option[func() check.Check]

Factory creates a new check factory

Types

type Check

type Check struct {
	core.CheckBase
	// contains filtered or unexported fields
}

Check doesn't need additional fields

func (*Check) Configure

func (c *Check) Configure(senderManager sender.SenderManager, integrationConfigDigest uint64, rawInstance integration.Data, rawInitConfig integration.Data, source string) error

Configure the networkpath check

func (*Check) Interval

func (c *Check) Interval() time.Duration

Interval returns the scheduling time for the check

func (*Check) Run

func (c *Check) Run() error

Run executes the check

func (*Check) SendNetPathMDToEP

func (c *Check) SendNetPathMDToEP(sender sender.Sender, path traceroute.NetworkPath) error

SendNetPathMDToEP sends a traced network path to EP

type CheckConfig

type CheckConfig struct {
	DestHostname          string
	DestPort              uint16
	MaxTTL                uint8
	TimeoutMs             uint
	MinCollectionInterval time.Duration
	Tags                  []string
}

CheckConfig defines the configuration of the Network Path integration

func NewCheckConfig

func NewCheckConfig(rawInstance integration.Data, rawInitConfig integration.Data) (*CheckConfig, error)

NewCheckConfig builds a new check config

type InitConfig

type InitConfig struct {
	MinCollectionInterval int `yaml:"min_collection_interval"`
}

InitConfig is used to deserialize integration init config

type InstanceConfig

type InstanceConfig struct {
	DestHostname string `yaml:"hostname"`

	DestPort uint16 `yaml:"port"`

	MaxTTL uint8 `yaml:"max_ttl"`

	TimeoutMs uint `yaml:"timeout"` // millisecond

	MinCollectionInterval int `yaml:"min_collection_interval"`

	Tags []string `yaml:"tags"`
}

InstanceConfig is used to deserialize integration instance config

Jump to

Keyboard shortcuts

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