mirror of
https://github.com/minio/minio.git
synced 2025-11-12 23:01:39 -05:00
Add Prometheus metrics for Minio gateway (#5987)
This commit is contained in:
committed by
Nitish Tiwari
parent
7ac0fccb6e
commit
a50cc7e937
@@ -187,6 +187,9 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
||||
// Add healthcheck router
|
||||
registerHealthCheckRouter(router)
|
||||
|
||||
// Add server metrics router
|
||||
registerMetricsRouter(router)
|
||||
|
||||
// Register web router when its enabled.
|
||||
if globalIsBrowserEnabled {
|
||||
logger.FatalIf(registerWebRouter(router), "Unable to configure web browser")
|
||||
@@ -196,6 +199,8 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
||||
registerAPIRouter(router)
|
||||
|
||||
globalHTTPServer = xhttp.NewServer([]string{gatewayAddr}, registerHandlers(router, globalHandlers...), globalTLSCertificate)
|
||||
globalHTTPServer.UpdateBytesReadFunc = globalConnStats.incInputBytes
|
||||
globalHTTPServer.UpdateBytesWrittenFunc = globalConnStats.incOutputBytes
|
||||
|
||||
// Start server, automatically configures TLS if certs are available.
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user