From 3de2542d21da8b15db960677ad82a7d74d306714 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Tue, 13 Feb 2018 17:03:22 +0100 Subject: [PATCH] Fix NFSd metric type (#819) RPC Count should be a counter, not a gauge. --- collector/fixtures/e2e-output.txt | 2 +- collector/nfsd_linux.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index cb1cbc67..9691e71f 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt @@ -2686,7 +2686,7 @@ node_nfsd_rpc_errors_total{error="auth"} 2 node_nfsd_rpc_errors_total{error="cInt"} 0 node_nfsd_rpc_errors_total{error="fmt"} 1 # HELP node_nfsd_server_rpcs_total Total number of NFSd RPCs. -# TYPE node_nfsd_server_rpcs_total gauge +# TYPE node_nfsd_server_rpcs_total counter node_nfsd_server_rpcs_total 18628 # HELP node_nfsd_server_threads Total number of NFSd kernel threads that are running. # TYPE node_nfsd_server_threads gauge diff --git a/collector/nfsd_linux.go b/collector/nfsd_linux.go index 1de614af..f4974460 100644 --- a/collector/nfsd_linux.go +++ b/collector/nfsd_linux.go @@ -230,7 +230,7 @@ func (c *nfsdCollector) updateNFSdServerRPCStats(ch chan<- prometheus.Metric, s nil, nil, ), - prometheus.GaugeValue, + prometheus.CounterValue, float64(s.RPCCount)) }