split influx code into new package
This commit is contained in:
parent
e1f4ef8713
commit
a8a1e4426e
|
|
@ -1,4 +1,4 @@
|
||||||
package pollerunifi
|
package pollerinflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package pollerunifi
|
package pollerinflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
influx "github.com/influxdata/influxdb1-client/v2"
|
influx "github.com/influxdata/influxdb1-client/v2"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package pollerunifi
|
package pollerinflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package pollerunifi
|
package pollerinflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package pollerunifi
|
package pollerinflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package pollerunifi
|
package pollerinflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package pollerunifi
|
package pollerinflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -6,6 +6,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/davidnewhall/unifi-poller/pollerinflux"
|
||||||
influx "github.com/influxdata/influxdb1-client/v2"
|
influx "github.com/influxdata/influxdb1-client/v2"
|
||||||
"golift.io/unifi"
|
"golift.io/unifi"
|
||||||
)
|
)
|
||||||
|
|
@ -205,15 +206,15 @@ func (m *Metrics) ProcessPoints() []error {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, asset := range m.Sites {
|
for _, asset := range m.Sites {
|
||||||
pts, err := SitePoints(asset, m.TS)
|
pts, err := pollerinflux.SitePoints(asset, m.TS)
|
||||||
processPoints(m, pts, err)
|
processPoints(m, pts, err)
|
||||||
}
|
}
|
||||||
for _, asset := range m.Clients {
|
for _, asset := range m.Clients {
|
||||||
pts, err := ClientPoints(asset, m.TS)
|
pts, err := pollerinflux.ClientPoints(asset, m.TS)
|
||||||
processPoints(m, pts, err)
|
processPoints(m, pts, err)
|
||||||
}
|
}
|
||||||
for _, asset := range m.IDSList {
|
for _, asset := range m.IDSList {
|
||||||
pts, err := IDSPoints(asset) // no m.TS.
|
pts, err := pollerinflux.IDSPoints(asset) // no m.TS.
|
||||||
processPoints(m, pts, err)
|
processPoints(m, pts, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,19 +222,19 @@ func (m *Metrics) ProcessPoints() []error {
|
||||||
return errs
|
return errs
|
||||||
}
|
}
|
||||||
for _, asset := range m.Devices.UAPs {
|
for _, asset := range m.Devices.UAPs {
|
||||||
pts, err := UAPPoints(asset, m.TS)
|
pts, err := pollerinflux.UAPPoints(asset, m.TS)
|
||||||
processPoints(m, pts, err)
|
processPoints(m, pts, err)
|
||||||
}
|
}
|
||||||
for _, asset := range m.Devices.USGs {
|
for _, asset := range m.Devices.USGs {
|
||||||
pts, err := USGPoints(asset, m.TS)
|
pts, err := pollerinflux.USGPoints(asset, m.TS)
|
||||||
processPoints(m, pts, err)
|
processPoints(m, pts, err)
|
||||||
}
|
}
|
||||||
for _, asset := range m.Devices.USWs {
|
for _, asset := range m.Devices.USWs {
|
||||||
pts, err := USWPoints(asset, m.TS)
|
pts, err := pollerinflux.USWPoints(asset, m.TS)
|
||||||
processPoints(m, pts, err)
|
processPoints(m, pts, err)
|
||||||
}
|
}
|
||||||
for _, asset := range m.Devices.UDMs {
|
for _, asset := range m.Devices.UDMs {
|
||||||
pts, err := UDMPoints(asset, m.TS)
|
pts, err := pollerinflux.UDMPoints(asset, m.TS)
|
||||||
processPoints(m, pts, err)
|
processPoints(m, pts, err)
|
||||||
}
|
}
|
||||||
return errs
|
return errs
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue