Documentation
¶
Overview ¶
Package payload contains Network Path payload
Index ¶
- func NewPathtraceID() string
- func ValidateNetworkPath(path *NetworkPath) error
- type E2eProbe
- type E2eProbeRttLatency
- type HopCountStats
- type ICMPMode
- type NetworkPath
- type NetworkPathDestination
- type NetworkPathSource
- type PathOrigin
- type Protocol
- type TCPMethod
- type Traceroute
- type TracerouteDestination
- type TracerouteHop
- type TracerouteRun
- type TracerouteSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateNetworkPath ¶ added in v0.73.0
func ValidateNetworkPath(path *NetworkPath) error
ValidateNetworkPath validates a NetworkPath payload. Returns an error if any run does not have a valid destination IP address.
Types ¶
type E2eProbe ¶ added in v0.72.0
type E2eProbe struct {
RTTs []float64 `json:"rtts"` // ms
PacketsSent int `json:"packets_sent"`
PacketsReceived int `json:"packets_received"`
PacketLossPercentage float32 `json:"packet_loss_percentage"`
Jitter float64 `json:"jitter"` // ms
RTT E2eProbeRttLatency `json:"rtt"` // ms
}
E2eProbe contains e2e probe results
type E2eProbeRttLatency ¶ added in v0.72.0
type E2eProbeRttLatency struct {
Avg float64 `json:"avg"`
Min float64 `json:"min"`
Max float64 `json:"max"`
}
E2eProbeRttLatency contains e2e latency stats
type HopCountStats ¶ added in v0.72.0
HopCountStats contains hop count stats
type ICMPMode ¶ added in v0.71.0
type ICMPMode string
ICMPMode determines whether dynamic paths will run ICMP traceroutes for TCP/UDP traffic (instead of TCP/UDP traceroutes)
const ( // ICMPModeNone means to never use ICMP in dynamic path ICMPModeNone ICMPMode = "none" // ICMPModeTCP means to replace TCP traceroutes with ICMP ICMPModeTCP ICMPMode = "tcp" // ICMPModeUDP means to replace UDP traceroutes with ICMP ICMPModeUDP ICMPMode = "udp" // ICMPModeAll means to replace all traceroutes with ICMP ICMPModeAll ICMPMode = "all" )
const ICMPDefaultMode ICMPMode = ICMPModeNone
ICMPDefaultMode is what mode to use when nothing is specified
func MakeICMPMode ¶ added in v0.71.0
MakeICMPMode converts config strings into ICMPModes
func (ICMPMode) ShouldUseICMP ¶ added in v0.71.0
ShouldUseICMP returns whether ICMP mode should overwrite the given protocol
type NetworkPath ¶
type NetworkPath struct {
Timestamp int64 `json:"timestamp"`
AgentVersion string `json:"agent_version"`
Namespace string `json:"namespace"` // namespace used to resolve NDM resources
TestConfigID string `json:"test_config_id"` // ID represent the test configuration created in UI/backend/Agent
TestResultID string `json:"test_result_id"` // ID of specific test result (test run)
PathtraceID string `json:"pathtrace_id"` // DEPRECATED
Origin PathOrigin `json:"origin"`
Protocol Protocol `json:"protocol"`
Source NetworkPathSource `json:"source"`
Destination NetworkPathDestination `json:"destination"`
Traceroute Traceroute `json:"traceroute"`
E2eProbe E2eProbe `json:"e2e_probe"`
Tags []string `json:"tags,omitempty"`
}
NetworkPath encapsulates data that defines a path between two hosts as mapped by the agent
type NetworkPathDestination ¶
type NetworkPathDestination struct {
Hostname string `json:"hostname"`
Port uint16 `json:"port"`
Service string `json:"service,omitempty"`
}
NetworkPathDestination encapsulates information about the destination of a path
type NetworkPathSource ¶
type NetworkPathSource struct {
Name string `json:"name"`
DisplayName string `json:"display_name"`
Hostname string `json:"hostname"`
Via *payload.Via `json:"via,omitempty"`
NetworkID string `json:"network_id,omitempty"` // Today this will be a VPC ID since we only resolve AWS resources
Service string `json:"service,omitempty"`
ContainerID string `json:"container_id,omitempty"`
}
NetworkPathSource encapsulates information about the source of a path
type PathOrigin ¶
type PathOrigin string
PathOrigin origin of the path e.g. network_traffic, network_path_integration
const ( // PathOriginNetworkTraffic correspond to traffic from network traffic (NPM). PathOriginNetworkTraffic PathOrigin = "network_traffic" // PathOriginNetworkPathIntegration correspond to traffic from network_path integration. PathOriginNetworkPathIntegration PathOrigin = "network_path_integration" )
type Protocol ¶
type Protocol string
Protocol defines supported network protocols Please define new protocols based on the Keyword from: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
type TCPMethod ¶ added in v0.66.0
type TCPMethod string
TCPMethod is the method used to run a TCP traceroute.
const ( // TCPConfigSYN means to only perform SYN traceroutes TCPConfigSYN TCPMethod = "syn" // TCPConfigSACK means to only perform SACK traceroutes TCPConfigSACK TCPMethod = "sack" // TCPConfigPreferSACK means to try SACK, and fall back to SYN if the remote doesn't support SACK TCPConfigPreferSACK TCPMethod = "prefer_sack" // TCPConfigSYNSocket means to use a SYN with TCP socket options to perform the traceroute (windows only) TCPConfigSYNSocket TCPMethod = "syn_socket" )
const TCPDefaultMethod TCPMethod = TCPConfigSYN
TCPDefaultMethod is what method to use when nothing is specified
func MakeTCPMethod ¶ added in v0.66.0
MakeTCPMethod converts a TCP traceroute method from config into a TCPMethod
type Traceroute ¶ added in v0.72.0
type Traceroute struct {
Runs []TracerouteRun `json:"runs"`
HopCount HopCountStats `json:"hop_count"`
}
Traceroute contains traceroute results
type TracerouteDestination ¶ added in v0.72.0
type TracerouteDestination struct {
IPAddress net.IP `json:"ip_address"`
Port uint16 `json:"port"`
ReverseDNS []string `json:"reverse_dns,omitempty"`
}
TracerouteDestination contains result destination info
type TracerouteHop ¶ added in v0.72.0
type TracerouteHop struct {
TTL int `json:"ttl"`
IPAddress net.IP `json:"ip_address"`
ReverseDNS []string `json:"reverse_dns,omitempty"`
RTT float64 `json:"rtt,omitempty"`
Reachable bool `json:"reachable"`
}
TracerouteHop encapsulates information about a single hop in a traceroute
type TracerouteRun ¶ added in v0.72.0
type TracerouteRun struct {
RunID string `json:"run_id"`
Source TracerouteSource `json:"source"`
Destination TracerouteDestination `json:"destination"`
Hops []TracerouteHop `json:"hops"`
}
TracerouteRun contains traceroute results for a single run
type TracerouteSource ¶ added in v0.72.0
TracerouteSource contains result source info