diff --git a/cmd/support-top-net.go b/cmd/support-top-net.go index 1c946523..b87e7461 100644 --- a/cmd/support-top-net.go +++ b/cmd/support-top-net.go @@ -89,16 +89,19 @@ func mainSupportTopNet(ctx *cli.Context) error { ctxt, cancel := context.WithCancel(globalContext) defer cancel() - - _, e := client.ServerInfo(ctxt) + info, e := client.ServerInfo(ctxt) fatalIf(probe.NewError(e).Trace(aliasedURL), "Unable to initialize admin client.") - + hosts := make([]string, 0, len(info.Servers)) + for _, s := range info.Servers { + hosts = append(hosts, s.Endpoint) + } // MetricsOptions are options provided to Metrics call. opts := madmin.MetricsOptions{ Type: madmin.MetricNet, Interval: time.Duration(ctx.Int("interval")) * time.Second, ByHost: true, N: ctx.Int("count"), + Hosts: hosts, } p := tea.NewProgram(initTopNetUI())