Cleanup NFS metrics (#834)

* Cleanup NFS metrics

* Update `nfs` metric names to match `nfsd`.
* Remove uneeded `tcp` label from TCP connections metric.
* Remove uneeded `v` on `nfsd` metrics.
* Enable all `nfs` v4 client metrics.
* Remove `nfs` metric name overrides.

* Add ppc64le fixture.

* Fix typo.
This commit is contained in:
Ben Kochie 2018-02-21 07:25:41 +01:00 committed by GitHub
commit e0d54a509c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 383 additions and 406 deletions

View file

@ -186,7 +186,7 @@ func (c *nfsdCollector) updateNFSdReadAheadCacheStats(ch chan<- prometheus.Metri
func (c *nfsdCollector) updateNFSdNetworkStats(ch chan<- prometheus.Metric, s *nfs.Network) {
packetDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, nfsdSubsystem, "packets_total"),
"Total NFSd network packets (sent+recieved) by protocol type.",
"Total NFSd network packets (sent+received) by protocol type.",
[]string{"proto"},
nil,
)
@ -242,7 +242,7 @@ func (c *nfsdCollector) updateNFSdServerRPCStats(ch chan<- prometheus.Metric, s
// updateNFSdRequestsv2Stats collects statistics for NFSv2 requests.
func (c *nfsdCollector) updateNFSdRequestsv2Stats(ch chan<- prometheus.Metric, s *nfs.V2Stats) {
const proto = "v2"
const proto = "2"
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
float64(s.GetAttr), proto, "GetAttr")
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
@ -281,7 +281,7 @@ func (c *nfsdCollector) updateNFSdRequestsv2Stats(ch chan<- prometheus.Metric, s
// updateNFSdRequestsv3Stats collects statistics for NFSv3 requests.
func (c *nfsdCollector) updateNFSdRequestsv3Stats(ch chan<- prometheus.Metric, s *nfs.V3Stats) {
const proto = "v3"
const proto = "3"
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
float64(s.GetAttr), proto, "GetAttr")
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
@ -328,7 +328,7 @@ func (c *nfsdCollector) updateNFSdRequestsv3Stats(ch chan<- prometheus.Metric, s
// updateNFSdRequestsv4Stats collects statistics for NFSv4 requests.
func (c *nfsdCollector) updateNFSdRequestsv4Stats(ch chan<- prometheus.Metric, s *nfs.V4Ops) {
const proto = "v4"
const proto = "4"
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,
float64(s.Access), proto, "Access")
ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,