fix: gateway_s3_bytes_sent metric for all API methods (#9242)

Co-authored-by: Harshavardhana <harsha@minio.io>
This commit is contained in:
poornas
2020-04-01 12:52:31 -07:00
committed by GitHub
parent 95e89f1712
commit 336460f67e
4 changed files with 29 additions and 4 deletions

View File

@@ -203,6 +203,24 @@ func gatewayMetricsPrometheus(ch chan<- prometheus.Metric) {
float64(s.Head.Load()),
http.MethodHead,
)
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(
prometheus.BuildFQName("gateway", globalGatewayName, "requests"),
"Total number of requests made to "+globalGatewayName+" by current MinIO Gateway",
[]string{"method"}, nil),
prometheus.CounterValue,
float64(s.Put.Load()),
http.MethodPut,
)
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(
prometheus.BuildFQName("gateway", globalGatewayName, "requests"),
"Total number of requests made to "+globalGatewayName+" by current MinIO Gateway",
[]string{"method"}, nil),
prometheus.CounterValue,
float64(s.Post.Load()),
http.MethodPost,
)
}
// collects cache metrics for MinIO server in Prometheus specific format