diff --git a/pkg/promunifi/usg.go b/pkg/promunifi/usg.go index bfccae37..a60f0915 100644 --- a/pkg/promunifi/usg.go +++ b/pkg/promunifi/usg.go @@ -109,17 +109,19 @@ func (u *promUnifi) exportUSG(r report, d *unifi.USG) { // Gateway Stats. func (u *promUnifi) exportUSGstats(r report, labels []string, gw *unifi.Gw, st unifi.SpeedtestStatus, ul unifi.Uplink) { - if gw == nil { - return - } - - labelLan := []string{"lan", labels[1], labels[2], labels[3]} var sourceInterface string + if st.SourceInterface != "" { sourceInterface = st.SourceInterface } else { sourceInterface = "all" } + + if gw == nil { + return + } + + labelLan := []string{"lan", labels[1], labels[2], labels[3]} labelWan := []string{sourceInterface, labels[1], labels[2], labels[3]} r.send([]*metric{