Skip to content

Commit

Permalink
NFSd: fix nfsd v4 index miss (prometheus#2824)
Browse files Browse the repository at this point in the history
* fix nfsd v4 index miss

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
  • Loading branch information
dongjiang1989 authored and oblitorum committed Apr 9, 2024
1 parent b44dbf8 commit 2d42a51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collector/fixtures/e2e-64k-page-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2738,6 +2738,8 @@ node_nfsd_requests_total{method="SecInfo",proto="4"} 0
node_nfsd_requests_total{method="SetAttr",proto="2"} 0
node_nfsd_requests_total{method="SetAttr",proto="3"} 0
node_nfsd_requests_total{method="SetAttr",proto="4"} 0
node_nfsd_requests_total{method="SetClientID",proto="4"} 3
node_nfsd_requests_total{method="SetClientIDConfirm",proto="4"} 3
node_nfsd_requests_total{method="SymLink",proto="2"} 0
node_nfsd_requests_total{method="SymLink",proto="3"} 0
node_nfsd_requests_total{method="Verify",proto="4"} 0
Expand Down
2 changes: 2 additions & 0 deletions collector/fixtures/e2e-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3029,6 +3029,8 @@ node_nfsd_requests_total{method="SecInfo",proto="4"} 0
node_nfsd_requests_total{method="SetAttr",proto="2"} 0
node_nfsd_requests_total{method="SetAttr",proto="3"} 0
node_nfsd_requests_total{method="SetAttr",proto="4"} 0
node_nfsd_requests_total{method="SetClientID",proto="4"} 3
node_nfsd_requests_total{method="SetClientIDConfirm",proto="4"} 3
node_nfsd_requests_total{method="SymLink",proto="2"} 0
node_nfsd_requests_total{method="SymLink",proto="3"} 0
node_nfsd_requests_total{method="Verify",proto="4"} 0
Expand Down
4 changes: 4 additions & 0 deletions collector/nfsd_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ func (c *nfsdCollector) updateNFSdRequestsv4Stats(ch chan<- prometheus.Metric, s
float64(s.SecInfo), proto, "SecInfo")
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
float64(s.SetAttr), proto, "SetAttr")
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
float64(s.SetClientID), proto, "SetClientID")
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
float64(s.SetClientIDConfirm), proto, "SetClientIDConfirm")
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
float64(s.Verify), proto, "Verify")
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
Expand Down

0 comments on commit 2d42a51

Please sign in to comment.