painful upgrade for dumb go versioning
This commit is contained in:
parent
b9d668abee
commit
b372198840
6
go.mod
6
go.mod
|
|
@ -13,14 +13,18 @@ require (
|
|||
github.com/prometheus/common v0.61.0
|
||||
github.com/spf13/pflag v1.0.6-0.20201009195203-85dd5c8bc61c
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/unpoller/unifi/v5 v5.0.3
|
||||
golang.org/x/crypto v0.31.0
|
||||
golang.org/x/net v0.33.0
|
||||
golang.org/x/term v0.27.0
|
||||
golift.io/cnfg v0.2.3
|
||||
golift.io/cnfgfile v0.0.0-20240713024420-a5436d84eb48
|
||||
golift.io/version v0.0.2
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require github.com/unpoller/unifi v0.4.3 // indirect
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.4.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.0 // indirect
|
||||
|
|
@ -39,12 +43,10 @@ require (
|
|||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
github.com/unpoller/unifi v0.4.3
|
||||
golang.org/x/mod v0.7.0 // indirect
|
||||
golang.org/x/sys v0.28.0 // indirect
|
||||
golang.org/x/tools v0.3.0 // indirect
|
||||
google.golang.org/protobuf v1.35.2 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
// for local iterative development only
|
||||
|
|
|
|||
16
go.sum
16
go.sum
|
|
@ -1,9 +1,5 @@
|
|||
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
|
||||
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
|
||||
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q=
|
||||
github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||
github.com/DataDog/datadog-go/v5 v5.6.0 h1:2oCLxjF/4htd55piM75baflj/KoE6VYS7alEUqFvRDw=
|
||||
github.com/DataDog/datadog-go/v5 v5.6.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw=
|
||||
github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
|
||||
|
|
@ -26,20 +22,14 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.14.0 h1:AjbBfJuq+QoaXNcrova8smSjwJdUHnwvfjMF71M1iI4=
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.14.0/go.mod h1:Ahpm3QXKMJslpXl3IftVLVezreAUtBOTZssDrjZEFHI=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab h1:HqW4xhhynfjrtEiiSGcQUd6vrK23iMam1FO8rI7mwig=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU=
|
||||
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
|
||||
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf h1:7JTmneyiNEwVBOHSjoMxiWAqB992atOeepeFYegn5RU=
|
||||
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
|
||||
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
|
||||
|
|
@ -53,8 +43,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
|
|||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/oapi-codegen/runtime v1.0.0 h1:P4rqFX5fMFWqRzY9M/3YF9+aPSPPB06IzP2P7oOxrWo=
|
||||
github.com/oapi-codegen/runtime v1.0.0/go.mod h1:LmCUMQuPB4M/nLXilQXhHw+BLZdDb18B34OO356yJ/A=
|
||||
github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
|
||||
github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
|
|
@ -89,6 +77,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
|
|||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/unpoller/unifi v0.4.3 h1:MyX27nf/Nq9a+p/o5qIjNJDJSS+jvxGC7BbxDk09BRg=
|
||||
github.com/unpoller/unifi v0.4.3/go.mod h1:TWzPB/1SVbvoweS3RcknQj3Ds+MclHzGGE2weqI+vO0=
|
||||
github.com/unpoller/unifi/v5 v5.0.3 h1:LMm62uZZFbtgV+n06Wlchxsjmp+5TTdGmhZzu+7UZZQ=
|
||||
github.com/unpoller/unifi/v5 v5.0.3/go.mod h1:G45KRuSH9PFrIUFmDTzWEEM/E/e7GuyXp36AVOfhm7I=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
|
|
@ -130,8 +120,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
|
|||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golift.io/cnfg v0.2.3 h1:cQsC4JS20njJyu5drtGefNmgN7M4HrLaRDNBPLit3pQ=
|
||||
golift.io/cnfg v0.2.3/go.mod h1:T4t8MFa8aZilCdIk1qQrN4mOGaFVPZ/qHQBBMbCIZJ0=
|
||||
golift.io/cnfgfile v0.0.0-20230531075023-f880041cc0a0 h1:u14MTHfTGx7kLX2b3wFbaESrIm3YqL//HM92XA6wzH4=
|
||||
golift.io/cnfgfile v0.0.0-20230531075023-f880041cc0a0/go.mod h1:dVC3N+72/nHNlBv3cwXb4FQTxMAor+JlNClAldwACkY=
|
||||
golift.io/cnfgfile v0.0.0-20240713024420-a5436d84eb48 h1:c7cJWRr0cUnFHKtq072esKzhQHKlFA5YRY/hPzQrdko=
|
||||
golift.io/cnfgfile v0.0.0-20240713024420-a5436d84eb48/go.mod h1:zHm9o8SkZ6Mm5DfGahsrEJPsogyR0qItP59s5lJ98/I=
|
||||
golift.io/version v0.0.2 h1:i0gXRuSDHKs4O0sVDUg4+vNIuOxYoXhaxspftu2FRTE=
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package datadogunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// batchClient generates Unifi Client datapoints for Datadog.
|
||||
|
|
@ -37,12 +37,12 @@ func (u *DatadogUnifi) batchClient(r report, s *unifi.Client) { // nolint: funle
|
|||
"bssid": s.Bssid,
|
||||
"ip": s.IP,
|
||||
}
|
||||
|
||||
|
||||
powerSaveEnabled := 0.0
|
||||
if s.PowersaveEnabled.Val {
|
||||
powerSaveEnabled = 1.0
|
||||
}
|
||||
|
||||
|
||||
data := map[string]float64{
|
||||
"anomalies": s.Anomalies.Val,
|
||||
"channel": s.Channel.Val,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/DataDog/datadog-go/v5/statsd"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/poller"
|
||||
"golift.io/cnfg"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// These constants are used as names for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package datadogunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// pduT is used as a name for printed/logged counters.
|
||||
|
|
@ -45,9 +45,9 @@ func (u *DatadogUnifi) batchPDU(r report, s *unifi.PDU) {
|
|||
"user_num_sta": s.UserNumSta.Val,
|
||||
"upgradeable": boolToFloat64(s.Upgradeable.Val),
|
||||
})
|
||||
|
||||
|
||||
r.addCount(pduT)
|
||||
|
||||
|
||||
metricName := metricNamespace("pdu")
|
||||
reportGaugeForFloat64Map(r, metricName, data, tags)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package datadogunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// reportSite generates Unifi Sites' datapoints for Datadog.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package datadogunifi
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// uapT is used as a name for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// udmT is used as a name for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package datadogunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// usgT is used as a name for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package datadogunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// uswT is used as a name for printed/logged counters.
|
||||
|
|
@ -43,9 +43,9 @@ func (u *DatadogUnifi) batchUSW(r report, s *unifi.USW) {
|
|||
})
|
||||
|
||||
r.addCount(uswT)
|
||||
|
||||
|
||||
metricName := metricNamespace("usw")
|
||||
|
||||
|
||||
reportGaugeForFloat64Map(r, metricName, data, tags)
|
||||
|
||||
u.batchPortTable(r, tags, s.PortTable)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package datadogunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// uxgT is used as a name for printed/logged counters.
|
||||
|
|
@ -26,17 +26,17 @@ func (u *DatadogUnifi) batchUXG(r report, s *unifi.UXG) { // nolint: funlen
|
|||
"ip": s.IP,
|
||||
"license_state": s.LicenseState,
|
||||
})
|
||||
|
||||
|
||||
var gw *unifi.Gw
|
||||
if s.Stat != nil {
|
||||
gw = s.Stat.Gw
|
||||
}
|
||||
|
||||
|
||||
var sw *unifi.Sw
|
||||
if s.Stat != nil {
|
||||
sw = s.Stat.Sw
|
||||
}
|
||||
|
||||
|
||||
data := CombineFloat64(
|
||||
u.batchUDMstorage(s.Storage),
|
||||
u.batchUDMtemps(s.Temperatures),
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package influxunifi
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package influxunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// batchClient generates Unifi Client datapoints for InfluxDB.
|
||||
|
|
@ -33,7 +33,7 @@ func (u *InfluxUnifi) batchClient(r report, s *unifi.Client) { // nolint: funlen
|
|||
"channel": s.Channel.Txt,
|
||||
"vlan": s.Vlan.Txt,
|
||||
}
|
||||
|
||||
|
||||
fields := map[string]any{
|
||||
"anomalies": s.Anomalies.Int64(),
|
||||
"ip": s.IP,
|
||||
|
|
@ -81,7 +81,7 @@ func (u *InfluxUnifi) batchClientDPI(r report, v any, appTotal, catTotal totalsD
|
|||
s, ok := v.(*unifi.DPITable)
|
||||
if !ok {
|
||||
u.LogErrorf("invalid type given to batchClientDPI: %T", v)
|
||||
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package influxunifi
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// These constants are used as names for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
influx "github.com/influxdata/influxdb-client-go/v2"
|
||||
influxV1 "github.com/influxdata/influxdb1-client/v2"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/poller"
|
||||
"github.com/unpoller/unpoller/pkg/webserver"
|
||||
"golang.org/x/net/context"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package influxunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// pduT is used as a name for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package influxunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// batchSite generates Unifi Sites' datapoints for InfluxDB.
|
||||
|
|
@ -61,7 +61,7 @@ func (u *InfluxUnifi) batchSiteDPI(r report, v any) {
|
|||
s, ok := v.(*unifi.DPITable)
|
||||
if !ok {
|
||||
u.LogErrorf("invalid type given to batchSiteDPI: %T", v)
|
||||
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package influxunifi
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// uapT is used as a name for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package influxunifi
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// udmT is used as a name for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package influxunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// usgT is used as a name for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package influxunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// uswT is used as a name for printed/logged counters.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package influxunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// uxgT is used as a name for printed/logged counters.
|
||||
|
|
@ -24,7 +24,7 @@ func (u *InfluxUnifi) batchUXG(r report, s *unifi.UXG) { // nolint: funlen
|
|||
"serial": s.Serial,
|
||||
"type": s.Type,
|
||||
}
|
||||
|
||||
|
||||
var gw *unifi.Gw
|
||||
if s.Stat != nil {
|
||||
gw = s.Stat.Gw
|
||||
|
|
@ -34,7 +34,7 @@ func (u *InfluxUnifi) batchUXG(r report, s *unifi.UXG) { // nolint: funlen
|
|||
if s.Stat != nil {
|
||||
sw = s.Stat.Sw
|
||||
}
|
||||
|
||||
|
||||
fields := Combine(
|
||||
u.batchUDMstorage(s.Storage),
|
||||
u.batchUDMtemps(s.Temperatures),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/webserver"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/poller"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/poller"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/poller"
|
||||
"github.com/unpoller/unpoller/pkg/webserver"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/webserver"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/poller"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package lokiunifi
|
|||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
const typeAlarm = "Alarm"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package lokiunifi
|
|||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
const typeAnomaly = "Anomaly"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package lokiunifi
|
|||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
const typeEvent = "Event"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package lokiunifi
|
|||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
const typeIDs = "IDs"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package promunifi
|
|||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
type uclient struct {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
promver "github.com/prometheus/common/version"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
"github.com/unpoller/unpoller/pkg/poller"
|
||||
"github.com/unpoller/unpoller/pkg/webserver"
|
||||
"golift.io/version"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package promunifi
|
|||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
type pdu struct {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package promunifi
|
|||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
type site struct {
|
||||
|
|
@ -79,7 +79,7 @@ func (u *promUnifi) exportSiteDPI(r report, v any) {
|
|||
s, ok := v.(*unifi.DPITable)
|
||||
if !ok {
|
||||
u.LogErrorf("invalid type given to SiteDPI: %T", v)
|
||||
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package promunifi
|
|||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
type uap struct {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package promunifi
|
|||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// These are shared by all four device types: UDM, UAP, USG, USW.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
type usg struct {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package promunifi
|
|||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
type usw struct {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package promunifi
|
||||
|
||||
import (
|
||||
"github.com/unpoller/unifi"
|
||||
"github.com/unpoller/unifi/v5"
|
||||
)
|
||||
|
||||
// exportUXG is a collection of stats from USG and USW. It has no unique stats.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package unittest
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/unpoller/unifi/mocks"
|
||||
"github.com/unpoller/unifi/v5/mocks"
|
||||
"github.com/unpoller/unpoller/pkg/inputunifi"
|
||||
"github.com/unpoller/unpoller/pkg/poller"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue