Convert rxbytes in USG to FlexInt

This commit is contained in:
David Newhall II 2019-05-30 11:00:09 -07:00
parent 3349e422a3
commit 78cf4e282a
2 changed files with 9 additions and 9 deletions

View File

@ -48,7 +48,7 @@ func (u USG) Points() ([]*influx.Point, error) {
"license_state": u.LicenseState,
"fw_caps": u.FwCaps,
"guest-num_sta": u.GuestNumSta,
"rx_bytes": u.RxBytes,
"rx_bytes": u.RxBytes.Val,
"tx_bytes": u.TxBytes,
"uptime": u.Uptime,
"considered_lost_at": u.ConsideredLostAt,
@ -83,7 +83,7 @@ func (u USG) Points() ([]*influx.Point, error) {
"wan1_max_speed": u.Wan1.MaxSpeed,
"wan1_name": u.Wan1.Name,
"wan1_netmask": u.Wan1.Netmask,
"wan1_rx_bytes": u.Wan1.RxBytes,
"wan1_rx_bytes": u.Wan1.RxBytes.Val,
"wan1_rx_bytes-r": u.Wan1.RxBytesR,
"wan1_rx_dropped": u.Wan1.RxDropped,
"wan1_rx_errors": u.Wan1.RxErrors,
@ -165,7 +165,7 @@ func (u USG) Points() ([]*influx.Point, error) {
"name": p.Name,
"num_sta": p.NumSta,
"purpose": p.Purpose,
"rx_bytes": p.RxBytes,
"rx_bytes": p.RxBytes.Val,
"rx_packets": p.RxPackets,
"tx_bytes": p.TxBytes,
"tx_packets": p.TxPackets,

View File

@ -65,7 +65,7 @@ type USG struct {
Networkgroup string `json:"networkgroup"`
NumSta float64 `json:"num_sta"`
Purpose string `json:"purpose"`
RxBytes float64 `json:"rx_bytes"`
RxBytes FlexInt `json:"rx_bytes"`
RxPackets float64 `json:"rx_packets"`
SiteID string `json:"site_id"`
TxBytes float64 `json:"tx_bytes"`
@ -100,7 +100,7 @@ type USG struct {
Mac string `json:"mac"`
Name string `json:"name"`
Netmask string `json:"netmask"`
RxBytes float64 `json:"rx_bytes"`
RxBytes FlexInt `json:"rx_bytes"`
RxDropped float64 `json:"rx_dropped"`
RxErrors float64 `json:"rx_errors"`
RxMulticast float64 `json:"rx_multicast"`
@ -113,7 +113,7 @@ type USG struct {
Up FlexBool `json:"up"`
} `json:"port_table"`
Rollupgrade FlexBool `json:"rollupgrade"`
RxBytes float64 `json:"rx_bytes"`
RxBytes FlexInt `json:"rx_bytes"`
Serial string `json:"serial"`
SiteID string `json:"site_id"`
SpeedtestStatus struct {
@ -177,7 +177,7 @@ type USG struct {
Nameservers []string `json:"nameservers"`
Netmask string `json:"netmask"`
NumPort float64 `json:"num_port"`
RxBytes float64 `json:"rx_bytes"`
RxBytes FlexInt `json:"rx_bytes"`
RxBytesR float64 `json:"rx_bytes-r"`
RxDropped float64 `json:"rx_dropped"`
RxErrors float64 `json:"rx_errors"`
@ -215,7 +215,7 @@ type USG struct {
MaxSpeed float64 `json:"max_speed"`
Name string `json:"name"`
Netmask string `json:"netmask"`
RxBytes float64 `json:"rx_bytes"`
RxBytes FlexInt `json:"rx_bytes"`
RxBytesR float64 `json:"rx_bytes-r"`
RxDropped float64 `json:"rx_dropped"`
RxErrors float64 `json:"rx_errors"`
@ -242,7 +242,7 @@ type USG struct {
MaxSpeed float64 `json:"max_speed"`
Name string `json:"name"`
Netmask string `json:"netmask"`
RxBytes float64 `json:"rx_bytes"`
RxBytes FlexInt `json:"rx_bytes"`
RxBytesR float64 `json:"rx_bytes-r"`
RxDropped float64 `json:"rx_dropped"`
RxErrors float64 `json:"rx_errors"`