-
Bug
-
Resolution: Done
-
Major
-
netobserv-1.6
-
False
-
None
-
False
-
-
-
-
NetObserv - Sprint 256, NetObserv - Sprint 257
Description of problem:
When a metric is created with the FlowMetric API, then edited (e.g. to change a label), it may generate an error in FLP: error msg=error during prometheus.Register: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "netobserv_ingress_cardinality", help: "", constLabels: {}, variableLabels: {Flags,SrcSubnetLabel,DstK8S_Namespace,DstK8S_OwnerName,SrcK8S_OwnerName,SrcK8S_Namespace}} has different label names or a different help string
Steps to Reproduce:
1. Install netobserv 2. Install a flowmetrics, e.g. "oc apply -f https://raw.githubusercontent.com/netobserv/network-observability-operator/main/config/samples/flowmetrics/pods_ingress_traffic.yaml -n netobserv" 3. Edit it "oc edit flowmetrics flowmetric-pod-ingress-traffic", e.g. to add "Flags" as a label
Actual results: The new metric never comes up. Also, in FLP logs: time=2024-07-16T10:49:29Z level=error msg=error during prometheus.Register: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "netobserv_pod_ingress_bytes_total", help: "", constLabels: {}, variableLabels: {DstK8S_Name,DstK8S_Namespace,DstK8S_OwnerName,DstK8S_OwnerType,DstK8S_HostName,Flags}} has different label names or a different help string
Expected results:
No error
Workaround:
When modifying an existing metric that changes its definition in prometheus (different labels), the workaround is to also change the metric name, so prometheus sees it as a new metric.
Alternatively, you can also restart the FLP pods.
- links to
-
RHSA-2024:135231 Network Observability 1.7.0 for OpenShift
- mentioned on