-
Bug
-
Resolution: Done
-
None
-
Quality / Stability / Reliability
-
False
-
-
False
-
VERIFIED
-
-
-
CNV I/U Operators Sprint 239, CNV I/U Operators Sprint 240
-
Moderate
-
No
Description of problem:
We created a metric name linter in kubevirt/cluster-network-addons-operator based on promlint: https://github.com/kubevirt/cluster-network-addons-operator/pull/1580
This metrics names failed:
kubevirt_cnao_cr_kubemacpool_deployed_total: non-counter metrics should not have "_total" suffix
kubevirt_cnao_kubemacpool_manager_num_up_pods_total: non-counter metrics should not have "_total" suffix
kubevirt_kubemacpool_duplicate_macs_total: non-counter metrics should not have "_total" suffix
kubevirt_kubemacpool_duplicate_macs_total: name need to start with "kubevirt_cnao_"
In order to pass the linter the names can be:
`kubevirt_cnao_cr_kubemacpool_deployed_total` to `kubevirt_cnao_cr_kubemacpool_aggregated`
`kubevirt_cnao_kubemacpool_manager_num_up_pods_total` to `kubevirt_cnao_kubemacpool_manager_up`
`kubevirt_kubemacpool_duplicate_macs_total` to `kubevirt_cnao_kubemacpool_duplicate_macs`
Version-Release number of selected component (if applicable):
4.13
How reproducible:
100%
Steps to Reproduce:
1. cd cluster-network-addons-operator
2. checkout the pr https://github.com/kubevirt/cluster-network-addons-operator/pull/1580
3. remove the ignored metrics from excludedMetrics list in
tools/prom-metrics-collector/metrics_collector.go (in order to see the erros)
4.make lint-metrics
Actual results:
some metric names are not aligned with promlint linter.
Expected results:
Metrics named will be aligned with promlint linter and Prometheus best practices.
Additional info:
as for now the list of metrics are ignored in the linter.
- external trackers
- mentioned on