fixes sitedpi strings on influx and prom

This commit is contained in:
Cody Lee 2023-01-23 17:32:14 -06:00
parent 80792b8ca6
commit 2b185e88c7
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions

View File

@ -74,10 +74,10 @@ func (u *InfluxUnifi) batchSiteDPI(r report, v any) {
"source": s.SourceName,
},
Fields: map[string]any{
"tx_packets": dpi.TxPackets,
"rx_packets": dpi.RxPackets,
"tx_bytes": dpi.TxBytes,
"rx_bytes": dpi.RxBytes,
"tx_packets": dpi.TxPackets.Val,
"rx_packets": dpi.RxPackets.Val,
"tx_bytes": dpi.TxBytes.Val,
"rx_bytes": dpi.RxBytes.Val,
},
})
}

View File

@ -87,10 +87,10 @@ func (u *promUnifi) exportSiteDPI(r report, v any) {
// log.Println(labelsDPI, dpi.Cat, dpi.App, dpi.TxBytes, dpi.RxBytes, dpi.TxPackets, dpi.RxPackets)
r.send([]*metric{
{u.Site.DPITxPackets, gauge, dpi.TxPackets, labelDPI},
{u.Site.DPIRxPackets, gauge, dpi.RxPackets, labelDPI},
{u.Site.DPITxBytes, gauge, dpi.TxBytes, labelDPI},
{u.Site.DPIRxBytes, gauge, dpi.RxBytes, labelDPI},
{u.Site.DPITxPackets, gauge, dpi.TxPackets.Val, labelDPI},
{u.Site.DPIRxPackets, gauge, dpi.RxPackets.Val, labelDPI},
{u.Site.DPITxBytes, gauge, dpi.TxBytes.Val, labelDPI},
{u.Site.DPIRxBytes, gauge, dpi.RxBytes.Val, labelDPI},
})
}
}