mirror of
https://github.com/unpoller/unpoller.git
synced 2026-03-31 06:24:21 -04:00
chore: Update go.sum for unifi v5.11.0 and fix formatting
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4
go.sum
4
go.sum
@@ -77,8 +77,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
|
|||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||||
github.com/unpoller/unifi/v5 v5.10.0 h1:GzurmJqXBYLsxMtwMzejXdOlajbsxV7FLghu0cOcXG8=
|
github.com/unpoller/unifi/v5 v5.11.0 h1:QNt/RgwOkBWFjiUyHfIGs7OCuz2Me3gmZH92FVOzTnU=
|
||||||
github.com/unpoller/unifi/v5 v5.10.0/go.mod h1:vSIXIclPG9dpKxUp+pavfgENHWaTZXvDg7F036R1YCo=
|
github.com/unpoller/unifi/v5 v5.11.0/go.mod h1:vSIXIclPG9dpKxUp+pavfgENHWaTZXvDg7F036R1YCo=
|
||||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
|
|||||||
@@ -53,15 +53,15 @@ func (u *DatadogUnifi) batchWAN(r report, w *unifi.WANEnrichedConfiguration) {
|
|||||||
"magic_enabled": magicEnabled,
|
"magic_enabled": magicEnabled,
|
||||||
"vlan_enabled": vlanEnabled,
|
"vlan_enabled": vlanEnabled,
|
||||||
// Statistics
|
// Statistics
|
||||||
"uptime_percentage": stats.UptimePercentage,
|
"uptime_percentage": stats.UptimePercentage,
|
||||||
"peak_download_percent": stats.PeakUsage.DownloadPercentage,
|
"peak_download_percent": stats.PeakUsage.DownloadPercentage,
|
||||||
"peak_upload_percent": stats.PeakUsage.UploadPercentage,
|
"peak_upload_percent": stats.PeakUsage.UploadPercentage,
|
||||||
"max_rx_bytes_rate": stats.PeakUsage.MaxRxBytesR.Val,
|
"max_rx_bytes_rate": stats.PeakUsage.MaxRxBytesR.Val,
|
||||||
"max_tx_bytes_rate": stats.PeakUsage.MaxTxBytesR.Val,
|
"max_tx_bytes_rate": stats.PeakUsage.MaxTxBytesR.Val,
|
||||||
// Service Provider
|
// Service Provider
|
||||||
"service_provider_asn": details.ServiceProvider.ASN.Val,
|
"service_provider_asn": details.ServiceProvider.ASN.Val,
|
||||||
// Metadata
|
// Metadata
|
||||||
"creation_timestamp": details.CreationTimestamp.Val,
|
"creation_timestamp": details.CreationTimestamp.Val,
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, value := range data {
|
for name, value := range data {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
package influxunifi
|
package influxunifi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ func (u *InfluxUnifi) batchWAN(r report, w *unifi.WANEnrichedConfiguration) {
|
|||||||
details := w.Details
|
details := w.Details
|
||||||
|
|
||||||
tags := map[string]string{
|
tags := map[string]string{
|
||||||
"wan_id": cfg.ID,
|
"wan_id": cfg.ID,
|
||||||
"wan_name": cfg.Name,
|
"wan_name": cfg.Name,
|
||||||
"wan_networkgroup": cfg.WANNetworkgroup,
|
"wan_networkgroup": cfg.WANNetworkgroup,
|
||||||
"wan_type": cfg.WANType,
|
"wan_type": cfg.WANType,
|
||||||
"wan_load_balance_type": cfg.WANLoadBalanceType,
|
"wan_load_balance_type": cfg.WANLoadBalanceType,
|
||||||
"isp_name": details.ServiceProvider.Name,
|
"isp_name": details.ServiceProvider.Name,
|
||||||
"isp_city": details.ServiceProvider.City,
|
"isp_city": details.ServiceProvider.City,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert boolean FlexBool values to int for InfluxDB
|
// Convert boolean FlexBool values to int for InfluxDB
|
||||||
@@ -51,15 +51,15 @@ func (u *InfluxUnifi) batchWAN(r report, w *unifi.WANEnrichedConfiguration) {
|
|||||||
"magic_enabled": magicEnabled,
|
"magic_enabled": magicEnabled,
|
||||||
"vlan_enabled": vlanEnabled,
|
"vlan_enabled": vlanEnabled,
|
||||||
// Statistics
|
// Statistics
|
||||||
"uptime_percentage": stats.UptimePercentage,
|
"uptime_percentage": stats.UptimePercentage,
|
||||||
"peak_download_percent": stats.PeakUsage.DownloadPercentage,
|
"peak_download_percent": stats.PeakUsage.DownloadPercentage,
|
||||||
"peak_upload_percent": stats.PeakUsage.UploadPercentage,
|
"peak_upload_percent": stats.PeakUsage.UploadPercentage,
|
||||||
"max_rx_bytes_rate": stats.PeakUsage.MaxRxBytesR.Val,
|
"max_rx_bytes_rate": stats.PeakUsage.MaxRxBytesR.Val,
|
||||||
"max_tx_bytes_rate": stats.PeakUsage.MaxTxBytesR.Val,
|
"max_tx_bytes_rate": stats.PeakUsage.MaxTxBytesR.Val,
|
||||||
// Service Provider
|
// Service Provider
|
||||||
"service_provider_asn": details.ServiceProvider.ASN.Val,
|
"service_provider_asn": details.ServiceProvider.ASN.Val,
|
||||||
// Metadata
|
// Metadata
|
||||||
"creation_timestamp": details.CreationTimestamp.Val,
|
"creation_timestamp": details.CreationTimestamp.Val,
|
||||||
}
|
}
|
||||||
|
|
||||||
r.send(&metric{Table: "wan", Tags: tags, Fields: fields})
|
r.send(&metric{Table: "wan", Tags: tags, Fields: fields})
|
||||||
|
|||||||
Reference in New Issue
Block a user