networkpath

package
v0.0.0-...-de9e006 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 22 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(telemetry telemetryComp.Component, traceroute traceroute.Component) option.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) IsHASupported

func (c *Check) IsHASupported() bool

IsHASupported returns true if the check supports HA

func (*Check) Run

func (c *Check) Run() error

Run executes the check

func (*Check) SendNetPathMDToEP

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

SendNetPathMDToEP sends a traced network path to EP

type CheckConfig

type CheckConfig struct {
	DestHostname       string
	DestPort           uint16
	SourceService      string
	DestinationService string
	MaxTTL             uint8
	Protocol           payload.Protocol
	TCPMethod          payload.TCPMethod
	// TCPSynParisTracerouteMode makes TCP SYN traceroute act like paris traceroute (fixed packet ID, randomized seq)
	TCPSynParisTracerouteMode bool
	// DisableWindowsDriver disables the use of Windows driver for traceroute
	DisableWindowsDriver  bool
	Timeout               time.Duration
	MinCollectionInterval time.Duration
	TracerouteQueries     int
	E2eQueries            int
	Tags                  []string
	Namespace             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 int64 `yaml:"min_collection_interval"`
	TimeoutMs             int64 `yaml:"timeout"`
	MaxTTL                uint8 `yaml:"max_ttl"`
	TracerouteQueries     int   `yaml:"traceroute_queries"`
	E2eQueries            int   `yaml:"e2e_queries"`
}

InitConfig is used to deserialize integration init config

type InstanceConfig

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

	DestPort uint16 `yaml:"port"`

	Protocol  string `yaml:"protocol"`
	TCPMethod string `yaml:"tcp_method"`
	// TCPSynParisTracerouteMode makes TCP SYN traceroute act like paris traceroute (fixed packet ID, randomized seq)
	TCPSynParisTracerouteMode bool `yaml:"tcp_syn_paris_traceroute_mode"`
	// DisableWindowsDriver disables the use of Windows driver for traceroute
	DisableWindowsDriver bool `yaml:"disable_windows_driver"`

	SourceService      string `yaml:"source_service"`
	DestinationService string `yaml:"destination_service"`

	MaxTTL uint8 `yaml:"max_ttl"`

	TimeoutMs int64 `yaml:"timeout"`

	MinCollectionInterval int `yaml:"min_collection_interval"`

	TracerouteQueries int `yaml:"traceroute_queries"`
	E2eQueries        int `yaml:"e2e_queries"`

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

InstanceConfig is used to deserialize integration instance config

type Number

type Number interface {
	~int | ~int64 | ~uint8
}

Number is a type that is used to make a generic version of the firstNonZero function

Jump to

Keyboard shortcuts

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