Add RPC tcp timeout/errs and AVG duration to prometheus (#15747)

This commit is contained in:
Anis Elleuch
2022-09-26 17:04:26 +01:00
committed by GitHub
parent 1480340830
commit 048a46ec2a
4 changed files with 122 additions and 28 deletions

View File

@@ -56,7 +56,6 @@ import (
ioutilx "github.com/minio/minio/internal/ioutil"
"github.com/minio/minio/internal/logger"
"github.com/minio/minio/internal/logger/message/audit"
"github.com/minio/minio/internal/rest"
"github.com/minio/pkg/certs"
"github.com/minio/pkg/env"
"golang.org/x/oauth2"
@@ -1016,13 +1015,6 @@ func decodeDirObject(object string) string {
return object
}
// This is used by metrics to show the number of failed RPC calls
// between internodes
func loadAndResetRPCNetworkErrsCounter() uint64 {
defer rest.ResetNetworkErrsCounter()
return rest.GetNetworkErrsCounter()
}
// Helper method to return total number of nodes in cluster
func totalNodeCount() uint64 {
peers, _ := globalEndpoints.peers()