Skip to content

Commit

Permalink
NETOBSERV-557: add eBPF agent metrics for troubleshooting (netobserv#582
Browse files Browse the repository at this point in the history
)

* NETOBSERV-557: add eBPF agent metrics for troubleshooting

Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>

* Fix managed objects use with agent controller

* some doc fixes

---------

Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
Co-authored-by: Joel Takvorian <jtakvori@redhat.com>
  • Loading branch information
msherif1234 and jotak authored Feb 28, 2024
1 parent 6c41bd2 commit 609eb0a
Show file tree
Hide file tree
Showing 19 changed files with 1,288 additions and 16 deletions.
14 changes: 14 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` defines the desired eBPF agent configuration regarding metrics
type EBPFMetrics struct {
// Metrics server endpoint configuration for Prometheus scraper
// +optional
Server MetricsServerConfig `json:"server,omitempty"`

// 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,10 @@ 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` defines 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.

14 changes: 14 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` defines the desired eBPF agent configuration regarding metrics
type EBPFMetrics struct {
// Metrics server endpoint configuration for Prometheus scraper
// +optional
Server MetricsServerConfig `json:"server,omitempty"`

// 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,10 @@ 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` defines 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.

Loading

0 comments on commit 609eb0a

Please sign in to comment.