mirror of
https://github.com/unpoller/unpoller.git
synced 2026-10-18 22:40:03 +02:00
Every unpoller_wan_* series shipped with site_name="" and source="". The
exporter said so itself:
cfg.WANLoadBalanceType,
"", // site_name - will be set by caller if available
"", // source - will be set by caller if available
The caller had nothing to set them from: WANEnrichedConfiguration carried
no identity. unifi/v6.0.3 fixes that upstream — GetWANEnrichedConfiguration
now stamps SiteName and SourceName from the site it fetched, the same way
GetSiteDPI does.
This bumps to v6.0.3 and fills the labels in. Two slices needed it, not
one: the base label set and the provider label set built further down for
the isp_name/isp_city descriptors. The test caught the second, which I had
missed.
Why it matters: an instance polling several controllers emitted WAN
metrics that were indistinguishable from one another, since wan_id is the
only other distinguishing label. Attributing them downstream meant
hardcoding a mapping in the scrape config and hoping no second controller
ever gained a gateway — when one does, its metrics are silently filed
under the wrong customer. No error, no missing series, just wrong data.
Tests use the fakeReport already present in the package. They assert every
emitted metric carries both labels, and that a nil configuration still
produces nothing rather than panicking a poll.
TestExportWANIsAttributed fails on master and passes with this change.
74 lines
3.0 KiB
AMPL
74 lines
3.0 KiB
AMPL
module github.com/unpoller/unpoller
|
|
|
|
go 1.25.5
|
|
|
|
require (
|
|
github.com/DataDog/datadog-go/v5 v5.9.1
|
|
github.com/InfluxCommunity/influxdb3-go/v2 v2.17.0
|
|
github.com/flaticols/countrycodes v0.0.2
|
|
github.com/gorilla/mux v1.8.1
|
|
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c
|
|
github.com/pkg/errors v0.9.1
|
|
github.com/prometheus/client_golang v1.24.1
|
|
github.com/prometheus/common v0.70.1
|
|
github.com/spf13/pflag v1.0.10
|
|
github.com/stretchr/testify v1.12.1
|
|
github.com/unpoller/unifi/v6 v6.0.3
|
|
go.opentelemetry.io/otel v1.46.0
|
|
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.46.0
|
|
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.46.0
|
|
go.opentelemetry.io/otel/metric v1.46.0
|
|
go.opentelemetry.io/otel/sdk v1.46.0
|
|
go.opentelemetry.io/otel/sdk/metric v1.46.0
|
|
golang.org/x/crypto v0.55.0
|
|
golang.org/x/sync v0.22.0
|
|
golang.org/x/term v0.45.0
|
|
golift.io/cnfg v0.2.5
|
|
golift.io/cnfgfile v0.0.0-20240713024420-a5436d84eb48
|
|
golift.io/version v0.0.2
|
|
gopkg.in/yaml.v3 v3.0.1
|
|
)
|
|
|
|
require (
|
|
github.com/apache/arrow-go/v18 v18.6.0 // indirect
|
|
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
|
github.com/go-logr/logr v1.4.4 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/goccy/go-json v0.10.6 // indirect
|
|
github.com/google/flatbuffers v25.12.19+incompatible // indirect
|
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect
|
|
github.com/influxdata/line-protocol/v2 v2.2.1 // indirect
|
|
github.com/klauspost/compress v1.19.1 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
|
github.com/pierrec/lz4/v4 v4.1.26 // indirect
|
|
github.com/zeebo/xxh3 v1.1.0 // indirect
|
|
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
|
go.opentelemetry.io/otel/trace v1.46.0 // indirect
|
|
go.opentelemetry.io/proto/otlp v1.11.0 // indirect
|
|
go.yaml.in/yaml/v3 v3.0.5 // indirect
|
|
golang.org/x/exp v0.0.0-20260527015227-08cc5374adb3 // indirect
|
|
golang.org/x/net v0.58.0 // indirect
|
|
golang.org/x/text v0.41.0 // indirect
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 // indirect
|
|
google.golang.org/grpc v1.83.1 // indirect
|
|
)
|
|
|
|
require (
|
|
github.com/BurntSushi/toml v1.5.0 // indirect
|
|
github.com/Microsoft/go-winio v0.6.2 // indirect
|
|
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
|
|
github.com/beorn7/perks v1.0.1 // indirect
|
|
github.com/brianvoe/gofakeit/v6 v6.28.0 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/influxdata/influxdb-client-go/v2 v2.14.0
|
|
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf // indirect
|
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
|
github.com/oapi-codegen/runtime v1.6.0 // indirect
|
|
github.com/prometheus/client_model v0.6.2
|
|
github.com/prometheus/procfs v0.21.1 // indirect
|
|
golang.org/x/sys v0.47.0 // indirect
|
|
google.golang.org/protobuf v1.36.12 // indirect
|
|
)
|