chore: Update go.sum for unifi v5.11.0 and fix formatting

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
brngates98
2026-01-29 17:37:33 -05:00
co-authored by Cursor
parent af6cbdf79f
commit b96606128d
4 changed files with 23 additions and 23 deletions
+7 -7
View File
@@ -53,15 +53,15 @@ func (u *DatadogUnifi) batchWAN(r report, w *unifi.WANEnrichedConfiguration) {
"magic_enabled": magicEnabled,
"vlan_enabled": vlanEnabled,
// Statistics
"uptime_percentage": stats.UptimePercentage,
"peak_download_percent": stats.PeakUsage.DownloadPercentage,
"peak_upload_percent": stats.PeakUsage.UploadPercentage,
"max_rx_bytes_rate": stats.PeakUsage.MaxRxBytesR.Val,
"max_tx_bytes_rate": stats.PeakUsage.MaxTxBytesR.Val,
"uptime_percentage": stats.UptimePercentage,
"peak_download_percent": stats.PeakUsage.DownloadPercentage,
"peak_upload_percent": stats.PeakUsage.UploadPercentage,
"max_rx_bytes_rate": stats.PeakUsage.MaxRxBytesR.Val,
"max_tx_bytes_rate": stats.PeakUsage.MaxTxBytesR.Val,
// Service Provider
"service_provider_asn": details.ServiceProvider.ASN.Val,
"service_provider_asn": details.ServiceProvider.ASN.Val,
// Metadata
"creation_timestamp": details.CreationTimestamp.Val,
"creation_timestamp": details.CreationTimestamp.Val,
}
for name, value := range data {
+1 -1
View File
@@ -3,7 +3,7 @@
package influxunifi
import (
"context"
"context"
"crypto/tls"
"fmt"
"net/url"
+13 -13
View File
@@ -16,13 +16,13 @@ func (u *InfluxUnifi) batchWAN(r report, w *unifi.WANEnrichedConfiguration) {
details := w.Details
tags := map[string]string{
"wan_id": cfg.ID,
"wan_name": cfg.Name,
"wan_networkgroup": cfg.WANNetworkgroup,
"wan_type": cfg.WANType,
"wan_id": cfg.ID,
"wan_name": cfg.Name,
"wan_networkgroup": cfg.WANNetworkgroup,
"wan_type": cfg.WANType,
"wan_load_balance_type": cfg.WANLoadBalanceType,
"isp_name": details.ServiceProvider.Name,
"isp_city": details.ServiceProvider.City,
"isp_name": details.ServiceProvider.Name,
"isp_city": details.ServiceProvider.City,
}
// Convert boolean FlexBool values to int for InfluxDB
@@ -51,15 +51,15 @@ func (u *InfluxUnifi) batchWAN(r report, w *unifi.WANEnrichedConfiguration) {
"magic_enabled": magicEnabled,
"vlan_enabled": vlanEnabled,
// Statistics
"uptime_percentage": stats.UptimePercentage,
"peak_download_percent": stats.PeakUsage.DownloadPercentage,
"peak_upload_percent": stats.PeakUsage.UploadPercentage,
"max_rx_bytes_rate": stats.PeakUsage.MaxRxBytesR.Val,
"max_tx_bytes_rate": stats.PeakUsage.MaxTxBytesR.Val,
"uptime_percentage": stats.UptimePercentage,
"peak_download_percent": stats.PeakUsage.DownloadPercentage,
"peak_upload_percent": stats.PeakUsage.UploadPercentage,
"max_rx_bytes_rate": stats.PeakUsage.MaxRxBytesR.Val,
"max_tx_bytes_rate": stats.PeakUsage.MaxTxBytesR.Val,
// Service Provider
"service_provider_asn": details.ServiceProvider.ASN.Val,
"service_provider_asn": details.ServiceProvider.ASN.Val,
// Metadata
"creation_timestamp": details.CreationTimestamp.Val,
"creation_timestamp": details.CreationTimestamp.Val,
}
r.send(&metric{Table: "wan", Tags: tags, Fields: fields})