@@ -53,6 +53,8 @@ func (c *AgentConfig) Read(path string) error {
|
||||
|
||||
if c.IPReportPeriod == 0 {
|
||||
c.IPReportPeriod = 1800
|
||||
} else if c.IPReportPeriod < 30 {
|
||||
c.IPReportPeriod = 30
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
+10
-4
@@ -69,8 +69,6 @@ type Host struct {
|
||||
Arch string
|
||||
Virtualization string
|
||||
BootTime uint64
|
||||
IP string `json:"-"`
|
||||
CountryCode string
|
||||
Version string
|
||||
GPU []string
|
||||
}
|
||||
@@ -86,9 +84,17 @@ func (h *Host) PB() *pb.Host {
|
||||
Arch: h.Arch,
|
||||
Virtualization: h.Virtualization,
|
||||
BootTime: h.BootTime,
|
||||
Ip: h.IP,
|
||||
CountryCode: h.CountryCode,
|
||||
Version: h.Version,
|
||||
Gpu: h.GPU,
|
||||
}
|
||||
}
|
||||
|
||||
type GeoIP struct {
|
||||
IP IP `json:"ip,omitempty"`
|
||||
CountryCode string `json:"country_code,omitempty"`
|
||||
}
|
||||
|
||||
type IP struct {
|
||||
IPv4Addr string `json:"ipv4_addr,omitempty"`
|
||||
IPv6Addr string `json:"ipv6_addr,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user