[Agent] [Octopus] - caqa fix bugs

This commit is contained in:
zeaslity
2024-01-30 15:54:33 +08:00
parent a471dabe46
commit 36c650301e
15 changed files with 327 additions and 47 deletions

View File

@@ -10,6 +10,7 @@ import (
"strconv"
"strings"
"time"
"wdd.io/agent-go/utils"
)
type NetworkMetric struct {
@@ -165,6 +166,18 @@ func GetNetworkInfo() ([]NetworkInfo, error) {
return result, nil
}
func GetLocalHostIP() string {
interfaceStatList, err := net.Interfaces()
if err != nil {
log.ErrorF("[GetLocalHostIP] -- error %s", err.Error())
return ""
}
utils.BeautifulPrint(interfaceStatList)
return ""
}
func GetNetworkConnectionALl() []net.ConnectionStat {
connections, err := net.Connections("all")