Updated Prometheus metrics (#11141)

* Add metrics for nodes online and offline
* Add cluster capacity metrics
* Introduce v2 metrics
This commit is contained in:
Ritesh H Shukla
2021-01-18 20:35:38 -08:00
committed by GitHub
parent 3bda8f755c
commit b4add82bb6
27 changed files with 1669 additions and 252 deletions

View File

@@ -72,6 +72,13 @@ const (
writeLock
)
// BackendMetrics - represents bytes served from backend
type BackendMetrics struct {
bytesReceived uint64
bytesSent uint64
requestStats RequestStats
}
// ObjectLayer implements primitives for object API layer.
type ObjectLayer interface {
SetDriveCount() int // Only implemented by erasure layer
@@ -143,7 +150,7 @@ type ObjectLayer interface {
IsCompressionSupported() bool
// Backend related metrics
GetMetrics(ctx context.Context) (*Metrics, error)
GetMetrics(ctx context.Context) (*BackendMetrics, error)
// Returns health of the backend
Health(ctx context.Context, opts HealthOptions) HealthResult