diff --git a/api/flowmetrics/v1alpha1/flowmetric_types.go b/api/flowmetrics/v1alpha1/flowmetric_types.go
index e083210f8..9f0091b2f 100644
--- a/api/flowmetrics/v1alpha1/flowmetric_types.go
+++ b/api/flowmetrics/v1alpha1/flowmetric_types.go
@@ -76,6 +76,10 @@ type FlowMetricSpec struct {
// +required
Type MetricType `json:"type"`
+ // Help text of the metric, as it appears in Prometheus.
+ // +optional
+ Help string `json:"help,omitempty"`
+
// `valueField` is the flow field that must be used as a value for this metric (for example: `Bytes`). This field must hold numeric values.
// Leave empty to count flows rather than a specific value per flow.
// Refer to the documentation for the list of available fields: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/network_observability/json-flows-format-reference.
diff --git a/bundle/manifests/flows.netobserv.io_flowmetrics.yaml b/bundle/manifests/flows.netobserv.io_flowmetrics.yaml
index c325a64f4..b97bec0af 100644
--- a/bundle/manifests/flows.netobserv.io_flowmetrics.yaml
+++ b/bundle/manifests/flows.netobserv.io_flowmetrics.yaml
@@ -192,6 +192,9 @@ spec:
items:
type: string
type: array
+ help:
+ description: Help text of the metric, as it appears in Prometheus.
+ type: string
labels:
description: |-
`labels` is a list of fields that should be used as Prometheus labels, also known as dimensions (for example: `SrcK8S_Namespace`).
diff --git a/bundle/manifests/netobserv-operator.clusterserviceversion.yaml b/bundle/manifests/netobserv-operator.clusterserviceversion.yaml
index 6bf3d08c9..b2733cc8b 100644
--- a/bundle/manifests/netobserv-operator.clusterserviceversion.yaml
+++ b/bundle/manifests/netobserv-operator.clusterserviceversion.yaml
@@ -253,7 +253,7 @@ metadata:
categories: Monitoring, Networking, Observability
console.openshift.io/plugins: '["netobserv-plugin"]'
containerImage: quay.io/netobserv/network-observability-operator:1.9.2-community
- createdAt: "2025-09-30T17:05:14Z"
+ createdAt: "2025-10-01T10:32:51Z"
description: Network flows collector and monitoring solution
operatorframework.io/initialization-resource: '{"apiVersion":"flows.netobserv.io/v1beta2",
"kind":"FlowCollector","metadata":{"name":"cluster"},"spec": {}}'
diff --git a/config/crd/bases/flows.netobserv.io_flowmetrics.yaml b/config/crd/bases/flows.netobserv.io_flowmetrics.yaml
index 19e16fa4b..024a0cd9f 100644
--- a/config/crd/bases/flows.netobserv.io_flowmetrics.yaml
+++ b/config/crd/bases/flows.netobserv.io_flowmetrics.yaml
@@ -192,6 +192,9 @@ spec:
items:
type: string
type: array
+ help:
+ description: Help text of the metric, as it appears in Prometheus.
+ type: string
labels:
description: |-
`labels` is a list of fields that should be used as Prometheus labels, also known as dimensions (for example: `SrcK8S_Namespace`).
diff --git a/docs/FlowMetric.md b/docs/FlowMetric.md
index bae41e67e..44b87990b 100644
--- a/docs/FlowMetric.md
+++ b/docs/FlowMetric.md
@@ -152,6 +152,13 @@ Refer to the documentation for the list of available fields: https://docs.redhat
For instance, when flattening `Interfaces` on a bytes counter, a flow having Interfaces [br-ex, ens5] increases one counter for `br-ex` and another for `ens5`.
false |
+
+ | help |
+ string |
+
+ Help text of the metric, as it appears in Prometheus.
+ |
+ false |
| labels |
[]string |
diff --git a/go.mod b/go.mod
index 991d05fbb..fbcd20a71 100644
--- a/go.mod
+++ b/go.mod
@@ -71,11 +71,11 @@ require (
github.com/netsampler/goflow2 v1.3.7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
- github.com/prometheus/client_golang v1.23.0 // indirect
+ github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/procfs v0.17.0 // indirect
github.com/spf13/cobra v1.9.1 // indirect
- github.com/spf13/pflag v1.0.9 // indirect
+ github.com/spf13/pflag v1.0.10 // indirect
github.com/stoewer/go-strcase v1.3.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
@@ -104,7 +104,7 @@ require (
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
- google.golang.org/grpc v1.75.0 // indirect
+ google.golang.org/grpc v1.75.1 // indirect
google.golang.org/protobuf v1.36.8 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
@@ -118,3 +118,5 @@ require (
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)
+
+replace github.com/netobserv/flowlogs-pipeline => github.com/jpinsonneau/flowlogs-pipeline v0.1.9-rc1.0.20251001081611-41d20711f48a
diff --git a/go.sum b/go.sum
index 8c1307bcf..94c83d5f3 100644
--- a/go.sum
+++ b/go.sum
@@ -79,6 +79,8 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
+github.com/jpinsonneau/flowlogs-pipeline v0.1.9-rc1.0.20251001081611-41d20711f48a h1:LsADP4IZfGAS55b8HTYtxgqIynWR92GVMyi002XkNeo=
+github.com/jpinsonneau/flowlogs-pipeline v0.1.9-rc1.0.20251001081611-41d20711f48a/go.mod h1:9rG9AeMpoh5LIkjgXpRjvjE7DI3gwvAsVqTJIsWRqZk=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
@@ -103,8 +105,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/netobserv/flowlogs-pipeline v1.9.2-community h1:RYwbuxFCghfTyufn1QiSo2TPWeb69pg2SvQorglwFnc=
-github.com/netobserv/flowlogs-pipeline v1.9.2-community/go.mod h1:shv+KbOGiM2IYWPQWjVOcuaXu/y/ZdBIem59wLAVQ/M=
github.com/netobserv/netobserv-ebpf-agent v1.9.2-community h1:ghW16OO4QRWj0Uh1gMYX+NjAlgx2sZmCsO3Tkwoj4Do=
github.com/netobserv/netobserv-ebpf-agent v1.9.2-community/go.mod h1:17OaUNAwx0LxoeV/SaHlJIJP6bpN7zSvUP3GtZelESQ=
github.com/netsampler/goflow2 v1.3.7 h1:XZaTy8kkMnGXpJ9hS3KbO1McyrFTpVNhVFEx9rNhMmc=
@@ -126,8 +126,8 @@ github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.85.0 h1:oY+F5FZFmCjCyzkHWPjVQpzvnvEB/0FP+iyzDUUlqFc=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.85.0/go.mod h1:VB7wtBmDT6W2RJHzsvPZlBId+EnmeQA0d33fFTXvraM=
-github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc=
-github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE=
+github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
+github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
@@ -137,23 +137,23 @@ github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUO
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/sagikazarmark/locafero v0.9.0 h1:GbgQGNtTrEmddYDSAH9QLRyfAHY12md+8YFTqyMTC9k=
-github.com/sagikazarmark/locafero v0.9.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk=
+github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
+github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
-github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
-github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
-github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
-github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo=
-github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
-github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
+github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
+github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=
+github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
+github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
+github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
+github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
-github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
-github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4=
+github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
+github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
+github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs=
github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -258,8 +258,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 h1:
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:kXqgZtrWaf6qS3jZOCnCH7WYfrvFjkC51bM8fz3RsCA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 h1:pFyd6EwwL2TqFf8emdthzeX+gZE1ElRq3iM8pui4KBY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
-google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
-google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
+google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI=
+google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/helm/crds/flows.netobserv.io_flowmetrics.yaml b/helm/crds/flows.netobserv.io_flowmetrics.yaml
index ed1d0ee0f..3865d3210 100644
--- a/helm/crds/flows.netobserv.io_flowmetrics.yaml
+++ b/helm/crds/flows.netobserv.io_flowmetrics.yaml
@@ -180,6 +180,9 @@ spec:
items:
type: string
type: array
+ help:
+ description: Help text of the metric, as it appears in Prometheus.
+ type: string
labels:
description: |-
`labels` is a list of fields that should be used as Prometheus labels, also known as dimensions (for example: `SrcK8S_Namespace`).
diff --git a/internal/controller/flp/flp_pipeline_builder.go b/internal/controller/flp/flp_pipeline_builder.go
index b7768d64b..de3d97bd0 100644
--- a/internal/controller/flp/flp_pipeline_builder.go
+++ b/internal/controller/flp/flp_pipeline_builder.go
@@ -409,6 +409,7 @@ func flowMetricToFLP(fm *metricslatest.FlowMetric) (*api.MetricsItem, error) {
m := &api.MetricsItem{
Name: metricName,
Type: api.MetricEncodeOperationEnum(strings.ToLower(string(fm.Spec.Type))),
+ Help: fm.Spec.Help,
Filters: []api.MetricsFilter{},
Labels: fm.Spec.Labels,
Remap: remap,
diff --git a/internal/pkg/helper/otel/otel_config.go b/internal/pkg/helper/otel/otel_config.go
index b63139e39..35cd409d5 100644
--- a/internal/pkg/helper/otel/otel_config.go
+++ b/internal/pkg/helper/otel/otel_config.go
@@ -89,6 +89,7 @@ func GetOtelMetrics(flpMetrics []api.MetricsItem) ([]api.MetricsItem, error) {
otelMetrics = append(otelMetrics, api.MetricsItem{
Name: convertToOtelLabel(otelRules, m.Name),
Type: m.Type,
+ Help: m.Help,
Filters: convertToOtelFilters(otelRules, m.Filters),
ValueKey: convertToOtelLabel(otelRules, m.ValueKey),
Labels: convertToOtelLabels(otelRules, m.Labels),
diff --git a/internal/pkg/metrics/predefined_metrics.go b/internal/pkg/metrics/predefined_metrics.go
index 9f7e2f5a0..a086a6800 100644
--- a/internal/pkg/metrics/predefined_metrics.go
+++ b/internal/pkg/metrics/predefined_metrics.go
@@ -56,6 +56,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_%s_%s_total", groupTrimmed, lowDir, vt),
Type: metricslatest.CounterMetric,
+ Help: fmt.Sprintf("Total %s per %s in %s direction", vt, groupTrimmed, lowDir),
ValueField: valueField,
Direction: dir,
Labels: labels,
@@ -70,6 +71,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_sampling", groupTrimmed),
Type: metricslatest.GaugeMetric,
+ Help: fmt.Sprintf("Sampling per %s", groupTrimmed),
ValueField: "Sampling",
Labels: labels,
},
@@ -80,6 +82,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_flows_total", groupTrimmed),
Type: "counter",
+ Help: fmt.Sprintf("Total flows per %s", groupTrimmed),
Labels: labels,
},
tags: []string{group, group + "-flows", "flows"},
@@ -93,6 +96,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_rtt_seconds", groupTrimmed),
Type: metricslatest.HistogramMetric,
+ Help: fmt.Sprintf("Round-trip time latency in seconds per %s", groupTrimmed),
ValueField: "TimeFlowRttNs",
Filters: []metricslatest.MetricFilter{
{Field: "TimeFlowRttNs", MatchType: metricslatest.MatchPresence},
@@ -115,6 +119,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_drop_packets_total", groupTrimmed),
Type: metricslatest.CounterMetric,
+ Help: fmt.Sprintf("Total dropped packets per %s", groupTrimmed),
ValueField: "PktDropPackets",
Filters: []metricslatest.MetricFilter{
{Field: "PktDropPackets", MatchType: metricslatest.MatchPresence},
@@ -128,6 +133,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_drop_bytes_total", groupTrimmed),
Type: metricslatest.CounterMetric,
+ Help: fmt.Sprintf("Total dropped bytes per %s", groupTrimmed),
ValueField: "PktDropBytes",
Filters: []metricslatest.MetricFilter{
{Field: "PktDropBytes", MatchType: metricslatest.MatchPresence},
@@ -148,6 +154,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_dns_latency_seconds", groupTrimmed),
Type: metricslatest.HistogramMetric,
+ Help: fmt.Sprintf("DNS latency in seconds per %s", groupTrimmed),
ValueField: "DnsLatencyMs",
Filters: []metricslatest.MetricFilter{
{Field: "DnsId", MatchType: metricslatest.MatchPresence},
@@ -171,6 +178,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_network_policy_events_total", groupTrimmed),
Type: "counter",
+ Help: fmt.Sprintf("Total network policy events per %s", groupTrimmed),
Labels: netpolLabels,
Filters: []metricslatest.MetricFilter{{Field: "NetworkEvents>Feature", Value: "acl"}},
Flatten: []string{"NetworkEvents"},
@@ -197,6 +205,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: fmt.Sprintf("%s_ipsec_flows_total", groupTrimmed),
Type: metricslatest.CounterMetric,
+ Help: fmt.Sprintf("Total IPsec encrypted flows per %s", groupTrimmed),
Filters: []metricslatest.MetricFilter{{Field: "IPSecStatus", MatchType: metricslatest.MatchPresence}},
Labels: ipsecLabels,
Charts: ipsecStatusChart(group),
@@ -209,6 +218,7 @@ func init() {
FlowMetricSpec: metricslatest.FlowMetricSpec{
MetricName: "node_to_node_ingress_flows_total",
Type: metricslatest.CounterMetric,
+ Help: "Total ingress flows between nodes",
Labels: mapLabels[tagNodes],
Filters: []metricslatest.MetricFilter{
{Field: "FlowDirection", Value: "2", MatchType: metricslatest.MatchNotEqual},
diff --git a/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/encode_prom.go b/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/encode_prom.go
index 4c04b6361..e3016ed73 100644
--- a/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/encode_prom.go
+++ b/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/encode_prom.go
@@ -49,6 +49,7 @@ type PromConnectionInfo struct {
type MetricsItem struct {
Name string `yaml:"name" json:"name" doc:"the metric name"`
Type MetricEncodeOperationEnum `yaml:"type" json:"type" doc:"(enum) one of the following:"`
+ Help string `yaml:"help,omitempty" json:"help,omitempty" doc:"the metric help text"`
Filters []MetricsFilter `yaml:"filters" json:"filters" doc:"a list of criteria to filter entries by"`
ValueKey string `yaml:"valueKey" json:"valueKey" doc:"entry key from which to resolve metric value"`
Labels []string `yaml:"labels" json:"labels" doc:"labels to be associated with the metric"`
diff --git a/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/transform_filter.go b/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/transform_filter.go
index c70da3d04..a933438e0 100644
--- a/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/transform_filter.go
+++ b/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/transform_filter.go
@@ -63,7 +63,7 @@ type TransformFilterRule struct {
RemoveEntry *TransformFilterGenericRule `yaml:"removeEntry,omitempty" json:"removeEntry,omitempty" doc:"configuration for remove_entry_* rules"`
RemoveEntryAllSatisfied []*RemoveEntryRule `yaml:"removeEntryAllSatisfied,omitempty" json:"removeEntryAllSatisfied,omitempty" doc:"configuration for remove_entry_all_satisfied rule"`
KeepEntryQuery string `yaml:"keepEntryQuery,omitempty" json:"keepEntryQuery,omitempty" doc:"configuration for keep_entry rule"`
- KeepEntrySampling uint16 `yaml:"keepEntrySampling,omitempty" json:"keepEntrySampling,omitempty" doc:"sampling value for keep_entry type: 1 flow on is kept"`
+ KeepEntrySampling uint16 `yaml:"keepEntrySampling,omitempty" json:"keepEntrySampling,omitempty" doc:"sampling interval for keep_entry type: 1 flow on is kept"`
AddField *TransformFilterGenericRule `yaml:"addField,omitempty" json:"addField,omitempty" doc:"configuration for add_field rule"`
AddFieldIfDoesntExist *TransformFilterGenericRule `yaml:"addFieldIfDoesntExist,omitempty" json:"addFieldIfDoesntExist,omitempty" doc:"configuration for add_field_if_doesnt_exist rule"`
AddFieldIf *TransformFilterRuleWithAssignee `yaml:"addFieldIf,omitempty" json:"addFieldIf,omitempty" doc:"configuration for add_field_if rule"`
@@ -115,7 +115,7 @@ type RemoveEntryRule struct {
}
type SamplingCondition struct {
- Value uint16 `yaml:"value,omitempty" json:"value,omitempty" doc:"sampling value: 1 flow on is kept"`
+ Value uint16 `yaml:"value,omitempty" json:"value,omitempty" doc:"sampling interval: 1 flow on is kept"`
Rules []*RemoveEntryRule `yaml:"rules,omitempty" json:"rules,omitempty" doc:"rules to be satisfied for this sampling configuration"`
}
diff --git a/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/write_loki.go b/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/write_loki.go
index 344c8edf7..cdc9a36bc 100644
--- a/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/write_loki.go
+++ b/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/write_loki.go
@@ -37,7 +37,7 @@ type WriteLoki struct {
Labels []string `yaml:"labels,omitempty" json:"labels,omitempty" doc:"map of record fields to be used as labels"`
StaticLabels model.LabelSet `yaml:"staticLabels,omitempty" json:"staticLabels,omitempty" doc:"map of common labels to set on each flow"`
IgnoreList []string `yaml:"ignoreList,omitempty" json:"ignoreList,omitempty" doc:"map of record fields to be removed from the record"`
- ClientConfig *promConfig.HTTPClientConfig `yaml:"clientConfig,omitempty" json:"clientConfig,omitempty" doc:"clientConfig"`
+ ClientConfig *promConfig.HTTPClientConfig `yaml:"clientConfig,omitempty" json:"clientConfig,omitempty" doc:"Loki client configuration, which follows the same structure as the Prometheus HTTP client config described here: https://pkg.go.dev/github.com/prometheus/common/config#HTTPClientConfig"`
TimestampLabel model.LabelName `yaml:"timestampLabel,omitempty" json:"timestampLabel,omitempty" doc:"label to use for time indexing"`
// TimestampScale provides the scale in time of the units from the timestamp
// E.g. UNIX timescale is '1s' (one second) while other clock sources might have
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/desc.go b/vendor/github.com/prometheus/client_golang/prometheus/desc.go
index ad347113c..2331b8b4f 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/desc.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/desc.go
@@ -95,7 +95,8 @@ func (v2) NewDesc(fqName, help string, variableLabels ConstrainableLabels, const
help: help,
variableLabels: variableLabels.compile(),
}
- if !model.IsValidMetricName(model.LabelValue(fqName)) {
+ //nolint:staticcheck // TODO: Don't use deprecated model.NameValidationScheme.
+ if !model.NameValidationScheme.IsValidMetricName(fqName) {
d.err = fmt.Errorf("%q is not a valid metric name", fqName)
return d
}
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go b/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go
index f7f97ef92..d273b6640 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go
@@ -67,7 +67,7 @@ func RuntimeMetricsToProm(d *metrics.Description) (string, string, string, bool)
}
// Our current conversion moves to legacy naming, so use legacy validation.
- valid := model.IsValidLegacyMetricName(namespace + "_" + subsystem + "_" + name)
+ valid := model.LegacyValidation.IsValidMetricName(namespace + "_" + subsystem + "_" + name)
switch d.Kind {
case metrics.KindUint64:
case metrics.KindFloat64:
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/labels.go b/vendor/github.com/prometheus/client_golang/prometheus/labels.go
index c21911f29..5fe8d3b4d 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/labels.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/labels.go
@@ -184,5 +184,6 @@ func validateLabelValues(vals []string, expectedNumberOfValues int) error {
}
func checkLabelName(l string) bool {
- return model.LabelName(l).IsValid() && !strings.HasPrefix(l, reservedLabelPrefix)
+ //nolint:staticcheck // TODO: Don't use deprecated model.NameValidationScheme.
+ return model.NameValidationScheme.IsValidLabelName(l) && !strings.HasPrefix(l, reservedLabelPrefix)
}
diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go
index eeed1e92b..2fd3c5759 100644
--- a/vendor/github.com/spf13/pflag/flag.go
+++ b/vendor/github.com/spf13/pflag/flag.go
@@ -143,8 +143,9 @@ type ParseErrorsAllowlist struct {
UnknownFlags bool
}
-// DEPRECATED: please use ParseErrorsAllowlist instead
-// This type will be removed in a future release
+// ParseErrorsWhitelist defines the parsing errors that can be ignored.
+//
+// Deprecated: use [ParseErrorsAllowlist] instead. This type will be removed in a future release.
type ParseErrorsWhitelist = ParseErrorsAllowlist
// NormalizedName is a flag name that has been normalized according to rules
@@ -165,8 +166,9 @@ type FlagSet struct {
// ParseErrorsAllowlist is used to configure an allowlist of errors
ParseErrorsAllowlist ParseErrorsAllowlist
- // DEPRECATED: please use ParseErrorsAllowlist instead
- // This field will be removed in a future release
+ // ParseErrorsAllowlist is used to configure an allowlist of errors.
+ //
+ // Deprecated: use [FlagSet.ParseErrorsAllowlist] instead. This field will be removed in a future release.
ParseErrorsWhitelist ParseErrorsAllowlist
name string
@@ -1185,7 +1187,7 @@ func (f *FlagSet) Parse(arguments []string) error {
case ContinueOnError:
return err
case ExitOnError:
- if errors.Is(err, ErrHelp) {
+ if err == ErrHelp {
os.Exit(0)
}
fmt.Fprintln(f.Output(), err)
@@ -1214,7 +1216,7 @@ func (f *FlagSet) ParseAll(arguments []string, fn func(flag *Flag, value string)
case ContinueOnError:
return err
case ExitOnError:
- if errors.Is(err, ErrHelp) {
+ if err == ErrHelp {
os.Exit(0)
}
fmt.Fprintln(f.Output(), err)
diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index 3dea23573..d954a64c3 100644
--- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -277,11 +277,13 @@ func (ht *serverHandlerTransport) writeStatus(s *ServerStream, st *status.Status
if err == nil { // transport has not been closed
// Note: The trailer fields are compressed with hpack after this call returns.
// No WireLength field is set here.
+ s.hdrMu.Lock()
for _, sh := range ht.stats {
sh.HandleRPC(s.Context(), &stats.OutTrailer{
Trailer: s.trailer.Copy(),
})
}
+ s.hdrMu.Unlock()
}
ht.Close(errors.New("finished writing status"))
return err
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index 9f725e15a..83cee314c 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -1353,10 +1353,10 @@ func (t *http2Server) closeStream(s *ServerStream, rst bool, rstCode http2.ErrCo
// called to interrupt the potential blocking on other goroutines.
s.cancel()
- oldState := s.swapState(streamDone)
- if oldState == streamDone {
- return
- }
+ // We can't return early even if the stream's state is "done" as the state
+ // might have been set by the `finishStream` method. Deleting the stream via
+ // `finishStream` can get blocked on flow control.
+ s.swapState(streamDone)
t.deleteStream(s, eosReceived)
t.controlBuf.put(&cleanupStream{
diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go
index bc1eb290f..468f11065 100644
--- a/vendor/google.golang.org/grpc/version.go
+++ b/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.75.0"
+const Version = "1.75.1"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 0ac02d809..58eaea61b 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -161,7 +161,7 @@ github.com/munnerz/goautoneg
# github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
## explicit
github.com/mwitkow/go-conntrack
-# github.com/netobserv/flowlogs-pipeline v1.9.2-community
+# github.com/netobserv/flowlogs-pipeline v1.9.2-community => github.com/jpinsonneau/flowlogs-pipeline v0.1.9-rc1.0.20251001081611-41d20711f48a
## explicit; go 1.24.0
github.com/netobserv/flowlogs-pipeline/pkg/api
github.com/netobserv/flowlogs-pipeline/pkg/config
@@ -235,7 +235,7 @@ github.com/pmezard/go-difflib/difflib
## explicit; go 1.24.0
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1
-# github.com/prometheus/client_golang v1.23.0
+# github.com/prometheus/client_golang v1.23.2
## explicit; go 1.23.0
github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil
github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header
@@ -263,7 +263,7 @@ github.com/sirupsen/logrus
# github.com/spf13/cobra v1.9.1
## explicit; go 1.15
github.com/spf13/cobra
-# github.com/spf13/pflag v1.0.9
+# github.com/spf13/pflag v1.0.10
## explicit; go 1.12
github.com/spf13/pflag
# github.com/stoewer/go-strcase v1.3.1
@@ -451,7 +451,7 @@ google.golang.org/genproto/googleapis/api/httpbody
## explicit; go 1.23.0
google.golang.org/genproto/googleapis/rpc/errdetails
google.golang.org/genproto/googleapis/rpc/status
-# google.golang.org/grpc v1.75.0
+# google.golang.org/grpc v1.75.1
## explicit; go 1.23.0
google.golang.org/grpc
google.golang.org/grpc/attributes
@@ -1237,3 +1237,4 @@ sigs.k8s.io/structured-merge-diff/v6/value
# sigs.k8s.io/yaml v1.6.0
## explicit; go 1.22
sigs.k8s.io/yaml
+# github.com/netobserv/flowlogs-pipeline => github.com/jpinsonneau/flowlogs-pipeline v0.1.9-rc1.0.20251001081611-41d20711f48a