Bug 2196251 - [Kubevirt] Metrics names failed promlint linter
Summary: [Kubevirt] Metrics names failed promlint linter
Keywords:
Status: POST
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Metrics
Version: 4.13.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: 4.14.0
Assignee: Shirly Radco
QA Contact: Ohad
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-08 13:13 UTC by Aviv Litman
Modified: 2023-08-08 12:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 9821 0 None open Update metric names to fit metrics naming conventions 2023-08-08 12:49:43 UTC
Github kubevirt user-guide pull 702 0 None open update metric name 2023-08-08 12:50:41 UTC
Github openshift openshift-docs pull 62711 0 None open Updated kubevirt metrics names 2023-08-08 12:50:41 UTC
Red Hat Issue Tracker CNV-28671 0 None None None 2023-05-08 13:17:03 UTC

Description Aviv Litman 2023-05-08 13:13:52 UTC
Description of problem:
We created a metric name linter in kubevirt based on promlint: https://github.com/kubevirt/kubevirt/pull/9709.
This metrics names failed:

$ make lint-metrics
hack/dockerized "./hack/prom-metric-linter/metric_name_linter.sh"
go version go1.19.2 linux/amd64

go version go1.19.2 linux/amd64
kubevirt_migrate_vmi_pending_count: non-histogram and non-summary metrics should not have "_count" suffix
kubevirt_migrate_vmi_running_count: non-histogram and non-summary metrics should not have "_count" suffix
kubevirt_migrate_vmi_scheduling_count: non-histogram and non-summary metrics should not have "_count" suffix
kubevirt_vmi_cpu_affinity: counter metrics should have "_total" or "_timestamp_seconds" suffix
kubevirt_vmi_filesystem_capacity_bytes_total: non-counter metrics should not have "_total" suffix
kubevirt_vmi_memory_domain_bytes_total: non-counter metrics should not have "_total" suffix
kubevirt_vmi_memory_pgmajfault: counter metrics should have "_total" or "_timestamp_seconds" suffix
kubevirt_vmi_memory_pgminfault: counter metrics should have "_total" or "_timestamp_seconds" suffix
kubevirt_vmi_memory_swap_in_traffic_bytes_total: non-counter metrics should not have "_total" suffix
kubevirt_vmi_memory_swap_out_traffic_bytes_total: non-counter metrics should not have "_total" suffix
kubevirt_vmi_outdated_count: non-histogram and non-summary metrics should not have "_count" suffix
kubevirt_vmi_storage_flush_times_ms_total: metric names should not contain abbreviated units
kubevirt_vmi_storage_read_times_ms_total: metric names should not contain abbreviated units
kubevirt_vmi_storage_write_times_ms_total: metric names should not contain abbreviated units
kubevirt_vmi_vcpu_seconds: counter metrics should have "_total" or "_timestamp_seconds" suffix
kubevirt_vmi_vcpu_wait_seconds: counter metrics should have "_total" or "_timestamp_seconds" suffix
kubevirt_vmsnapshot_disks_restored_from_source_total: non-counter metrics should not have "_total" suffix
make: *** [Makefile:213: lint-metrics] Error 1

Version-Release number of selected component (if applicable):
4.13

How reproducible:
100%

Steps to Reproduce:
1.cd kubevirt
2.make lint-metrics

Actual results:
some metric names are not aligned with promlint. 

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.


Note You need to log in before you can comment on or make changes to this bug.