Skip to content

Commit

Permalink
NETOBSERV-557: add eBPF agent metrics for troubleshooting
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
  • Loading branch information
msherif1234 committed Feb 27, 2024
1 parent f4d840b commit aeed6d2
Show file tree
Hide file tree
Showing 19 changed files with 1,254 additions and 13 deletions.
13 changes: 13 additions & 0 deletions apis/flowcollector/v1beta1/flowcollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,16 @@ const (
FlowRTT AgentFeature = "FlowRTT"
)

// `EBPFMetrics` define the desired EBPF agent configuration regarding metrics
type EBPFMetrics struct {
// Metrics server endpoint configuration for Prometheus scraper
// +optional
Server MetricsServerConfig `json:"server,omitempty"`
//+kubebuilder:default:=false
// Set `enable` to `true` to enable EBPF agent metrics collection.
Enable *bool `json:"enable,omitempty"`
}

// `FlowCollectorEBPF` defines a FlowCollector that uses eBPF to collect the flows information
type FlowCollectorEBPF struct {
// Important: Run "make generate" to regenerate code after modifying this file
Expand Down Expand Up @@ -239,6 +249,9 @@ type FlowCollectorEBPF struct {
// - `FlowRTT` [unsupported (*)]: enable flow latency (RTT) calculations in the eBPF agent during TCP handshakes. This feature better works with `sampling` set to 1.<br>
// +optional
Features []AgentFeature `json:"features,omitempty"`
// `Metrics` define the EBPF agent configuration regarding metrics
// +optional
Metrics EBPFMetrics `json:"metrics,omitempty"`
}

// `FlowCollectorKafka` defines the desired Kafka config of FlowCollector
Expand Down
42 changes: 42 additions & 0 deletions apis/flowcollector/v1beta1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions apis/flowcollector/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions apis/flowcollector/v1beta2/flowcollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ const (
FlowRTT AgentFeature = "FlowRTT"
)

// `EBPFMetrics` define the desired EBPF agent configuration regarding metrics
type EBPFMetrics struct {
// Metrics server endpoint configuration for Prometheus scraper
// +optional
Server MetricsServerConfig `json:"server,omitempty"`
//+kubebuilder:default:=false
// Set `enable` to `true` to enable EBPF agent metrics collection.
Enable *bool `json:"enable,omitempty"`
}

// `FlowCollectorEBPF` defines a FlowCollector that uses eBPF to collect the flows information
type FlowCollectorEBPF struct {
// Important: Run "make generate" to regenerate code after modifying this file
Expand Down Expand Up @@ -246,6 +256,9 @@ type FlowCollectorEBPF struct {
// - `FlowRTT`: enable flow latency (RTT) calculations in the eBPF agent during TCP handshakes. This feature better works with `sampling` set to 1.<br>
// +optional
Features []AgentFeature `json:"features,omitempty"`
// `Metrics` define the EBPF agent configuration regarding metrics
// +optional
Metrics EBPFMetrics `json:"metrics,omitempty"`
}

// `FlowCollectorKafka` defines the desired Kafka config of FlowCollector
Expand Down
22 changes: 22 additions & 0 deletions apis/flowcollector/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aeed6d2

Please sign in to comment.