Render node graphs by node (#19356)

As total drives count, online vs offline are per node basis, its
corect to select node for which graphs need to be rendered.

Set prometheus scrape jobs to fetch metrics from all nodes. A sample
scrape job for node metrics could be as below

```
- job_name: minio-job-node
  bearer_token: <token>
  metrics_path: /minio/v2/metrics/node
  scheme: https
  tls_config:
    insecure_skip_verify: true
  static_configs:
  - targets: [tenant1-ss-0-0.tenant1-hl.tenant-ns.svc.cluster.local:9000,tenant1-ss-0-1.tenant1-hl.tenant-ns.svc.cluster.local:9000,tenant1-ss-0-2.tenant1-hl.tenant-ns.svc.cluster.local:9000,tenant1-ss-0-3.tenant1-hl.tenant-ns.svc.cluster.local:9000]
```

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
This commit is contained in:
Shubhendu 2024-03-27 23:11:08 +05:30 committed by GitHub
parent ec3a3bb10d
commit 3d4fc28ec9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

@ -113,7 +113,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "max(minio_node_drive_total{job=~\"$scrape_jobs\"})",
"expr": "max(minio_node_drive_total{job=~\"$scrape_jobs\",server=\"$server\"})",
"format": "table",
"hide": false,
"instant": true,
@ -181,7 +181,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "max(minio_node_drive_online_total{job=~\"$scrape_jobs\"})",
"expr": "max(minio_node_drive_online_total{job=~\"$scrape_jobs\",server=\"$server\"})",
"format": "time_series",
"hide": false,
"instant": true,
@ -200,7 +200,7 @@
},
"editorMode": "code",
"exemplar": false,
"expr": "max(minio_node_drive_offline_total{job=~\"$scrape_jobs\"})",
"expr": "max(minio_node_drive_offline_total{job=~\"$scrape_jobs\",server=\"$server\"})",
"format": "time_series",
"hide": false,
"instant": true,
@ -302,9 +302,9 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "minio_node_drive_total_bytes{job=~\"$scrape_jobs\"}",
"expr": "minio_node_drive_total_bytes{job=~\"$scrape_jobs\",server=\"$server\"}",
"interval": "",
"legendFormat": "Total [{{server}}:{{drive}}]",
"legendFormat": "Total [{{drive}}]",
"refId": "A"
},
{
@ -313,9 +313,9 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "minio_node_drive_used_bytes{job=~\"$scrape_jobs\"}",
"expr": "minio_node_drive_used_bytes{job=~\"$scrape_jobs\",server=\"$server\"}",
"interval": "",
"legendFormat": "Used [{{server}}:{{drive}}]",
"legendFormat": "Used [{{drive}}]",
"refId": "B"
},
{
@ -324,9 +324,9 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "minio_node_drive_free_bytes{job=~\"$scrape_jobs\"}",
"expr": "minio_node_drive_free_bytes{job=~\"$scrape_jobs\",server=\"$server\"}",
"interval": "",
"legendFormat": "Free [{{server}}:{{drive}}]",
"legendFormat": "Free [{{drive}}]",
"refId": "C"
}
],
@ -448,9 +448,9 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "minio_node_drive_free_inodes{job=~\"$scrape_jobs\"}",
"expr": "minio_node_drive_free_inodes{job=~\"$scrape_jobs\",server=\"$server\"}",
"interval": "",
"legendFormat": "[{{server}}:{{drive}}]",
"legendFormat": "[{{drive}}]",
"refId": "B"
}
],
@ -547,9 +547,9 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "minio_node_drive_latency_us{job=~\"$scrape_jobs\"}",
"expr": "minio_node_drive_latency_us{job=~\"$scrape_jobs\",server=\"$server\"}",
"interval": "",
"legendFormat": "[{{server}}:{{drive}}:{{api}}]",
"legendFormat": "[{{drive}}:{{api}}]",
"refId": "B"
}
],
@ -646,9 +646,9 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "minio_node_drive_errors_availability{job=~\"$scrape_jobs\"}",
"expr": "minio_node_drive_errors_availability{job=~\"$scrape_jobs\",server=\"$server\"}",
"interval": "",
"legendFormat": "[{{server}}:{{drive}}]",
"legendFormat": "[{{drive}}]",
"refId": "B"
}
],
@ -776,9 +776,9 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "minio_node_drive_errors_timeout{job=~\"$scrape_jobs\"}",
"expr": "minio_node_drive_errors_timeout{job=~\"$scrape_jobs\",server=\"$server\"}",
"interval": "",
"legendFormat": "[{{server}}:{{drive}}]",
"legendFormat": "[{{drive}}]",
"refId": "B"
}
],
@ -875,9 +875,9 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
"expr": "minio_node_drive_io_waiting{job=~\"$scrape_jobs\"}",
"expr": "minio_node_drive_io_waiting{job=~\"$scrape_jobs\",server=\"$server\"}",
"interval": "",
"legendFormat": "[{{server}}:{{drive}}]",
"legendFormat": "[{{drive}}]",
"refId": "B"
}
],
@ -914,6 +914,26 @@
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": false,
"text": "tenant1-ss-0-0.tenant1-hl.tenant-ns.svc.cluster.local:9000",
"value": "tenant1-ss-0-0.tenant1-hl.tenant-ns.svc.cluster.local:9000"
},
"hide": 0,
"label": "Server",
"name": "server",
"options": [
{
"selected": true,
"text": "tenant1-ss-0-0.tenant1-hl.tenant-ns.svc.cluster.local:9000",
"value": "tenant1-ss-0-0.tenant1-hl.tenant-ns.svc.cluster.local:9000"
}
],
"query": "tenant1-ss-0-0.tenant1-hl.tenant-ns.svc.cluster.local:9000",
"skipUrlSync": false,
"type": "textbox"
}
]
},
@ -950,4 +970,4 @@
"uid": "TgmJnnqn2k",
"version": 1,
"weekStart": ""
}
}