From e1d0e2e9e837b43b5c570cab071514fe3dd40866 Mon Sep 17 00:00:00 2001 From: dongjiang1989 Date: Mon, 16 Oct 2023 22:54:45 +0800 Subject: [PATCH] fix GaugeValue type Signed-off-by: dongjiang1989 --- collector/fixtures/e2e-64k-page-output.txt | 16 ++++++++-------- collector/fixtures/e2e-output.txt | 16 ++++++++-------- collector/mountstats_linux.go | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/collector/fixtures/e2e-64k-page-output.txt b/collector/fixtures/e2e-64k-page-output.txt index 99e59ff1..8683f1cf 100644 --- a/collector/fixtures/e2e-64k-page-output.txt +++ b/collector/fixtures/e2e-64k-page-output.txt @@ -2283,14 +2283,14 @@ node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test" # TYPE node_mountstats_nfs_transport_pullup_copy_total counter node_mountstats_nfs_transport_pullup_copy_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 node_mountstats_nfs_transport_pullup_copy_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 -# HELP node_mountstats_nfs_transport_rdma_reply_sum Total number of rdma reply accessed when receiving a reply. -# TYPE node_mountstats_nfs_transport_rdma_reply_sum gauge -node_mountstats_nfs_transport_rdma_reply_sum{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 -node_mountstats_nfs_transport_rdma_reply_sum{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 -# HELP node_mountstats_nfs_transport_rdma_request_sum Total number of rdma request accessed when sending a call. -# TYPE node_mountstats_nfs_transport_rdma_request_sum gauge -node_mountstats_nfs_transport_rdma_request_sum{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 -node_mountstats_nfs_transport_rdma_request_sum{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 +# HELP node_mountstats_nfs_transport_rdma_reply_requests Total number of rdma reply accessed when receiving a reply. +# TYPE node_mountstats_nfs_transport_rdma_reply_requests gauge +node_mountstats_nfs_transport_rdma_reply_requests{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 +node_mountstats_nfs_transport_rdma_reply_requests{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 +# HELP node_mountstats_nfs_transport_rdma_requests Total number of rdma request accessed when sending a call. +# TYPE node_mountstats_nfs_transport_rdma_requests gauge +node_mountstats_nfs_transport_rdma_requests{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 +node_mountstats_nfs_transport_rdma_requests{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 # HELP node_mountstats_nfs_transport_read_chunk_total Total number of read chunk accessed when sending a call. # TYPE node_mountstats_nfs_transport_read_chunk_total counter node_mountstats_nfs_transport_read_chunk_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index dd5e403e..5e5cd093 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt @@ -2305,14 +2305,14 @@ node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test" # TYPE node_mountstats_nfs_transport_pullup_copy_total counter node_mountstats_nfs_transport_pullup_copy_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 node_mountstats_nfs_transport_pullup_copy_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 -# HELP node_mountstats_nfs_transport_rdma_reply_sum Total number of rdma reply accessed when receiving a reply. -# TYPE node_mountstats_nfs_transport_rdma_reply_sum gauge -node_mountstats_nfs_transport_rdma_reply_sum{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 -node_mountstats_nfs_transport_rdma_reply_sum{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 -# HELP node_mountstats_nfs_transport_rdma_request_sum Total number of rdma request accessed when sending a call. -# TYPE node_mountstats_nfs_transport_rdma_request_sum gauge -node_mountstats_nfs_transport_rdma_request_sum{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 -node_mountstats_nfs_transport_rdma_request_sum{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 +# HELP node_mountstats_nfs_transport_rdma_reply_requests Total number of rdma reply accessed when receiving a reply. +# TYPE node_mountstats_nfs_transport_rdma_reply_requests gauge +node_mountstats_nfs_transport_rdma_reply_requests{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 +node_mountstats_nfs_transport_rdma_reply_requests{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 +# HELP node_mountstats_nfs_transport_rdma_requests Total number of rdma request accessed when sending a call. +# TYPE node_mountstats_nfs_transport_rdma_requests gauge +node_mountstats_nfs_transport_rdma_requests{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 +node_mountstats_nfs_transport_rdma_requests{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0 # HELP node_mountstats_nfs_transport_read_chunk_total Total number of read chunk accessed when sending a call. # TYPE node_mountstats_nfs_transport_read_chunk_total counter node_mountstats_nfs_transport_read_chunk_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0 diff --git a/collector/mountstats_linux.go b/collector/mountstats_linux.go index 1cc5897b..97349a89 100644 --- a/collector/mountstats_linux.go +++ b/collector/mountstats_linux.go @@ -308,7 +308,7 @@ func NewMountStatsCollector(logger log.Logger) (Collector, error) { ), NFSTransportRdmaRequestTotal: prometheus.NewDesc( - prometheus.BuildFQName(namespace, subsystem, "transport_rdma_request_sum"), + prometheus.BuildFQName(namespace, subsystem, "transport_rdma_requests"), "Total number of rdma request accessed when sending a call.", labels, nil, @@ -371,7 +371,7 @@ func NewMountStatsCollector(logger log.Logger) (Collector, error) { ), NFSTransportRdmaReplyTotal: prometheus.NewDesc( - prometheus.BuildFQName(namespace, subsystem, "transport_rdma_reply_sum"), + prometheus.BuildFQName(namespace, subsystem, "transport_rdma_reply_requests"), "Total number of rdma reply accessed when receiving a reply.", labels, nil,