You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apis/flowmetrics/v1alpha1/flowmetric_types.go
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,11 @@ type FlowMetricSpec struct {
93
93
// +optional
94
94
Labels []string`json:"labels"`
95
95
96
+
// `flatten` is a list of list-type fields that must be flattened, such as Interfaces and NetworkEvents. Flattened fields generate one metric per item in that field.
97
+
// 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`.
98
+
// +optional
99
+
Flatten []string`json:"flatten"`
100
+
96
101
// Set the `remap` property to use different names for the generated metric labels than the flow fields. Use the origin flow fields as keys, and the desired label names as values.
Copy file name to clipboardExpand all lines: bundle/manifests/flows.netobserv.io_flowmetrics.yaml
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -196,6 +196,13 @@ spec:
196
196
- matchType
197
197
type: object
198
198
type: array
199
+
flatten:
200
+
description: |-
201
+
`flatten` is a list of list-type fields that must be flattened, such as Interfaces and NetworkEvents. Flattened fields generate one metric per item in that field.
202
+
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`.
203
+
items:
204
+
type: string
205
+
type: array
199
206
labels:
200
207
description: |-
201
208
`labels` is a list of fields that should be used as Prometheus labels, also known as dimensions.
Copy file name to clipboardExpand all lines: config/crd/bases/flows.netobserv.io_flowmetrics.yaml
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,13 @@ spec:
186
186
- matchType
187
187
type: object
188
188
type: array
189
+
flatten:
190
+
description: |-
191
+
`flatten` is a list of list-type fields that must be flattened, such as Interfaces and NetworkEvents. Flattened fields generate one metric per item in that field.
192
+
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`.
193
+
items:
194
+
type: string
195
+
type: array
189
196
labels:
190
197
description: |-
191
198
`labels` is a list of fields that should be used as Prometheus labels, also known as dimensions.
Copy file name to clipboardExpand all lines: docs/FlowMetric.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,14 @@ be used to eliminate duplicates: `Duplicate != "true"` and `FlowDirection = "0"`
151
151
Refer to the documentation for the list of available fields: https://docs.openshift.com/container-platform/latest/observability/network_observability/json-flows-format-reference.html.<br/>
152
152
</td>
153
153
<td>false</td>
154
+
</tr><tr>
155
+
<td><b>flatten</b></td>
156
+
<td>[]string</td>
157
+
<td>
158
+
`flatten` is a list of list-type fields that must be flattened, such as Interfaces and NetworkEvents. Flattened fields generate one metric per item in that field.
159
+
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`.<br/>
0 commit comments