NFSd: fix nfsd v4 index miss (#2824)

* fix nfsd v4 index miss

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
This commit is contained in:
dongjiang 2023-10-17 00:14:21 +08:00 committed by GitHub
parent 0f6a4d8c39
commit 86ed8cdc6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -2760,6 +2760,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

View file

@ -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,