Use better host names for metric errors (#18188)

Typically hosts would end up like this:

```
   "hosts": [
        ":9000",
        ":9000",
        ":9000",
...
```

Also add host name to errors.
This commit is contained in:
Klaus Post
2023-10-09 17:27:11 -07:00
committed by GitHub
parent 2b4531f069
commit 7cd08594f6
2 changed files with 7 additions and 20 deletions

View File

@@ -777,7 +777,7 @@ func (sys *NotificationSys) GetMetrics(ctx context.Context, t madmin.MetricType,
for index, err := range g.Wait() {
if err != nil {
reply[index].Errors = []string{err.Error()}
reply[index].Errors = []string{fmt.Sprintf("%s: %s (rpc)", sys.peerClients[index].String(), err.Error())}
}
}
return reply