@@ -31,7 +31,6 @@ import (
3131 "github.com/minio/console/pkg/utils"
3232
3333 subnet "github.com/minio/console/pkg/subnet"
34- "github.com/minio/madmin-go/v3"
3534 mc "github.com/minio/mc/cmd"
3635 "github.com/minio/websocket"
3736)
@@ -44,21 +43,7 @@ func startHealthInfo(ctx context.Context, conn WSConn, client MinioAdmin, deadli
4443 }
4544
4645 // Fetch info of all servers (cluster or single server)
47- healthDataTypes := []madmin.HealthDataType {
48- madmin .HealthDataTypeMinioInfo ,
49- madmin .HealthDataTypeMinioConfig ,
50- madmin .HealthDataTypeSysCPU ,
51- madmin .HealthDataTypeSysDriveHw ,
52- madmin .HealthDataTypeSysDocker ,
53- madmin .HealthDataTypeSysOsInfo ,
54- madmin .HealthDataTypeSysLoad ,
55- madmin .HealthDataTypeSysMem ,
56- madmin .HealthDataTypeSysNet ,
57- madmin .HealthDataTypeSysProcess ,
58- }
59- var err error
60- // Fetch info of all servers (cluster or single server)
61- healthInfo , version , err := client .serverHealthInfo (ctx , healthDataTypes , * deadline )
46+ healthInfo , version , err := client .serverHealthInfo (ctx , * deadline )
6247 if err != nil {
6348 return err
6449 }
@@ -75,7 +60,7 @@ func startHealthInfo(ctx context.Context, conn WSConn, client MinioAdmin, deadli
7560 }
7661
7762 ctx = context .WithValue (ctx , utils .ContextClientIP , conn .remoteAddress ())
78- err = sendHealthInfoToSubnet (ctx , healthInfo , client )
63+ err = sendHealthInfoToSubnet (ctx , compressedDiag , client )
7964 report := messageReport {
8065 Encoded : encodedDiag ,
8166 ServerHealthInfo : healthInfo ,
@@ -116,7 +101,7 @@ func updateMcGlobals(subnetTokenConfig subnet.LicenseTokenConfig) error {
116101 return nil
117102}
118103
119- func sendHealthInfoToSubnet (ctx context.Context , healthInfo interface {} , client MinioAdmin ) error {
104+ func sendHealthInfoToSubnet (ctx context.Context , compressedHealthInfo [] byte , client MinioAdmin ) error {
120105 filename := fmt .Sprintf ("health_%d.json.gz" , time .Now ().Unix ())
121106 subnetTokenConfig , e := GetSubnetKeyFromMinIOConfig (ctx , client )
122107 if e != nil {
@@ -135,10 +120,6 @@ func sendHealthInfoToSubnet(ctx context.Context, healthInfo interface{}, client
135120 return e
136121 }
137122 }
138- compressedHealthInfo , e := mc .TarGZHealthInfo (healthInfo , madmin .HealthInfoVersion )
139- if e != nil {
140- return e
141- }
142123 e = os .WriteFile (filename , compressedHealthInfo , 0o666 )
143124 if e != nil {
144125 return e
0 commit comments