mirror of
https://github.com/minio/minio.git
synced 2025-04-25 04:33:20 -04:00
fix: add missing minio_s3_requests_total (#15070)
PR #15052 caused a regression, add the missing metrics back. Bonus: - internode information should be only for distributed setups - update the dashboard to include 4xx and 5xx error panels.
This commit is contained in:
parent
d76c508566
commit
7413045f0e
@ -282,7 +282,9 @@ func setHTTPStatsHandler(h http.Handler) http.Handler {
|
|||||||
r.Body = meteredRequest
|
r.Body = meteredRequest
|
||||||
h.ServeHTTP(meteredResponse, r)
|
h.ServeHTTP(meteredResponse, r)
|
||||||
|
|
||||||
if strings.HasPrefix(r.URL.Path, minioReservedBucketPath) {
|
if strings.HasPrefix(r.URL.Path, storageRESTPrefix) ||
|
||||||
|
strings.HasPrefix(r.URL.Path, peerRESTPrefix) ||
|
||||||
|
strings.HasPrefix(r.URL.Path, lockRESTPrefix) {
|
||||||
globalConnStats.incInputBytes(meteredRequest.BytesRead())
|
globalConnStats.incInputBytes(meteredRequest.BytesRead())
|
||||||
globalConnStats.incOutputBytes(meteredResponse.BytesWritten())
|
globalConnStats.incOutputBytes(meteredResponse.BytesWritten())
|
||||||
} else {
|
} else {
|
||||||
|
@ -199,6 +199,8 @@ func (st *HTTPStats) updateStats(api string, r *http.Request, w *logger.Response
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
st.totalS3Requests.Inc(api)
|
||||||
|
|
||||||
// Increment the prometheus http request response histogram with appropriate label
|
// Increment the prometheus http request response histogram with appropriate label
|
||||||
httpRequestsDuration.With(prometheus.Labels{"api": api}).Observe(w.TimeToFirstByte.Seconds())
|
httpRequestsDuration.With(prometheus.Labels{"api": api}).Observe(w.TimeToFirstByte.Seconds())
|
||||||
|
|
||||||
|
@ -1587,19 +1587,21 @@ func getNetworkMetrics() *MetricsGroup {
|
|||||||
mg := &MetricsGroup{}
|
mg := &MetricsGroup{}
|
||||||
mg.RegisterRead(func(ctx context.Context) (metrics []Metric) {
|
mg.RegisterRead(func(ctx context.Context) (metrics []Metric) {
|
||||||
metrics = make([]Metric, 0, 10)
|
metrics = make([]Metric, 0, 10)
|
||||||
metrics = append(metrics, Metric{
|
|
||||||
Description: getInternodeFailedRequests(),
|
|
||||||
Value: float64(loadAndResetRPCNetworkErrsCounter()),
|
|
||||||
})
|
|
||||||
connStats := globalConnStats.toServerConnStats()
|
connStats := globalConnStats.toServerConnStats()
|
||||||
metrics = append(metrics, Metric{
|
if globalIsDistErasure {
|
||||||
Description: getInterNodeSentBytesMD(),
|
metrics = append(metrics, Metric{
|
||||||
Value: float64(connStats.TotalOutputBytes),
|
Description: getInternodeFailedRequests(),
|
||||||
})
|
Value: float64(loadAndResetRPCNetworkErrsCounter()),
|
||||||
metrics = append(metrics, Metric{
|
})
|
||||||
Description: getInterNodeReceivedBytesMD(),
|
metrics = append(metrics, Metric{
|
||||||
Value: float64(connStats.TotalInputBytes),
|
Description: getInterNodeSentBytesMD(),
|
||||||
})
|
Value: float64(connStats.TotalOutputBytes),
|
||||||
|
})
|
||||||
|
metrics = append(metrics, Metric{
|
||||||
|
Description: getInterNodeReceivedBytesMD(),
|
||||||
|
Value: float64(connStats.TotalInputBytes),
|
||||||
|
})
|
||||||
|
}
|
||||||
metrics = append(metrics, Metric{
|
metrics = append(metrics, Metric{
|
||||||
Description: getS3SentBytesMD(),
|
Description: getS3SentBytesMD(),
|
||||||
Value: float64(connStats.S3OutputBytes),
|
Value: float64(connStats.S3OutputBytes),
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
"gnetId": 13502,
|
"gnetId": 13502,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
"id": null,
|
"id": null,
|
||||||
"iteration": 1654578559812,
|
"iteration": 1654921222878,
|
||||||
"links": [
|
"links": [
|
||||||
{
|
{
|
||||||
"icon": "external link",
|
"icon": "external link",
|
||||||
@ -1711,6 +1711,198 @@
|
|||||||
"alignLevel": null
|
"alignLevel": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {
|
||||||
|
"S3 Errors": "light-red",
|
||||||
|
"S3 Requests": "light-green"
|
||||||
|
},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": "${DS_PROMETHEUS}",
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 22
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 86,
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "8.2.1",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "sum by (server,api) (increase(minio_s3_requests_5xx_errors_total{job=\"$scrape_jobs\"}[$__rate_interval]))",
|
||||||
|
"interval": "1m",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "{{server,api}}",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeRegions": [],
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "S3 API Request Error Rate (5xx)",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"buckets": null,
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"$$hashKey": "object:331",
|
||||||
|
"format": "none",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$$hashKey": "object:332",
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false,
|
||||||
|
"alignLevel": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {
|
||||||
|
"S3 Errors": "light-red",
|
||||||
|
"S3 Requests": "light-green"
|
||||||
|
},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": "${DS_PROMETHEUS}",
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 22
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 88,
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "8.2.1",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "sum by (server,api) (increase(minio_s3_requests_4xx_errors_total{job=\"$scrape_jobs\"}[$__rate_interval]))",
|
||||||
|
"interval": "1m",
|
||||||
|
"intervalFactor": 2,
|
||||||
|
"legendFormat": "{{server,api}}",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeRegions": [],
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "S3 API Request Error Rate (4xx)",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"buckets": null,
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"$$hashKey": "object:331",
|
||||||
|
"format": "none",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$$hashKey": "object:332",
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false,
|
||||||
|
"alignLevel": null
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"aliasColors": {
|
"aliasColors": {
|
||||||
"10.13.1.25:9000 DELETE": "red",
|
"10.13.1.25:9000 DELETE": "red",
|
||||||
@ -1734,7 +1926,7 @@
|
|||||||
"h": 9,
|
"h": 9,
|
||||||
"w": 12,
|
"w": 12,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 22
|
"y": 32
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 17,
|
"id": 17,
|
||||||
@ -1839,7 +2031,7 @@
|
|||||||
"h": 9,
|
"h": 9,
|
||||||
"w": 12,
|
"w": 12,
|
||||||
"x": 12,
|
"x": 12,
|
||||||
"y": 22
|
"y": 32
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 84,
|
"id": 84,
|
||||||
@ -1947,7 +2139,7 @@
|
|||||||
"h": 9,
|
"h": 9,
|
||||||
"w": 12,
|
"w": 12,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 31
|
"y": 41
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 77,
|
"id": 77,
|
||||||
@ -2039,7 +2231,7 @@
|
|||||||
"h": 9,
|
"h": 9,
|
||||||
"w": 12,
|
"w": 12,
|
||||||
"x": 12,
|
"x": 12,
|
||||||
"y": 31
|
"y": 41
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 76,
|
"id": 76,
|
||||||
@ -2131,7 +2323,7 @@
|
|||||||
"h": 8,
|
"h": 8,
|
||||||
"w": 12,
|
"w": 12,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 40
|
"y": 50
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 74,
|
"id": 74,
|
||||||
@ -2225,7 +2417,7 @@
|
|||||||
"h": 8,
|
"h": 8,
|
||||||
"w": 12,
|
"w": 12,
|
||||||
"x": 12,
|
"x": 12,
|
||||||
"y": 40
|
"y": 50
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 82,
|
"id": 82,
|
||||||
@ -2330,7 +2522,7 @@
|
|||||||
"h": 9,
|
"h": 9,
|
||||||
"w": 12,
|
"w": 12,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 48
|
"y": 58
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 11,
|
"id": 11,
|
||||||
@ -2447,7 +2639,7 @@
|
|||||||
"h": 9,
|
"h": 9,
|
||||||
"w": 12,
|
"w": 12,
|
||||||
"x": 12,
|
"x": 12,
|
||||||
"y": 48
|
"y": 58
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 8,
|
"id": 8,
|
||||||
@ -2542,7 +2734,7 @@
|
|||||||
"h": 7,
|
"h": 7,
|
||||||
"w": 24,
|
"w": 24,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 57
|
"y": 67
|
||||||
},
|
},
|
||||||
"hiddenSeries": false,
|
"hiddenSeries": false,
|
||||||
"id": 73,
|
"id": 73,
|
||||||
@ -2666,7 +2858,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"time": {
|
"time": {
|
||||||
"from": "now-3h",
|
"from": "now-1h",
|
||||||
"to": "now"
|
"to": "now"
|
||||||
},
|
},
|
||||||
"timepicker": {
|
"timepicker": {
|
||||||
@ -2696,5 +2888,5 @@
|
|||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "MinIO Dashboard",
|
"title": "MinIO Dashboard",
|
||||||
"uid": "TgmJnqnnk",
|
"uid": "TgmJnqnnk",
|
||||||
"version": 8
|
"version": 10
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user