mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
fix: byHost realTime metrics API (#17681)
This commit is contained in:
@@ -453,6 +453,12 @@ func (s *peerRESTServer) GetMetricsHandler(w http.ResponseWriter, r *http.Reques
|
||||
for _, disk := range r.Form[peerRESTDisk] {
|
||||
diskMap[disk] = struct{}{}
|
||||
}
|
||||
|
||||
hostMap := make(map[string]struct{})
|
||||
for _, host := range r.Form[peerRESTHost] {
|
||||
hostMap[host] = struct{}{}
|
||||
}
|
||||
|
||||
jobID := r.Form.Get(peerRESTJobID)
|
||||
depID := r.Form.Get(peerRESTDepID)
|
||||
|
||||
@@ -461,6 +467,7 @@ func (s *peerRESTServer) GetMetricsHandler(w http.ResponseWriter, r *http.Reques
|
||||
|
||||
info := collectLocalMetrics(types, collectMetricsOpts{
|
||||
disks: diskMap,
|
||||
hosts: hostMap,
|
||||
jobID: jobID,
|
||||
depID: depID,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user