data: add support for OWE per-node statistics
Gluon exports information about how many OWE capable clients are connected to a given node. The OWE client count is already contained in the wifi* counters and only provides more-specific information.
This commit is contained in:
parent
d4c898d1c9
commit
4944790e06
|
@ -63,6 +63,9 @@ type Clients struct {
|
||||||
Wifi uint32 `json:"wifi"`
|
Wifi uint32 `json:"wifi"`
|
||||||
Wifi24 uint32 `json:"wifi24"`
|
Wifi24 uint32 `json:"wifi24"`
|
||||||
Wifi5 uint32 `json:"wifi5"`
|
Wifi5 uint32 `json:"wifi5"`
|
||||||
|
Owe uint32 `json:"owe"`
|
||||||
|
Owe24 uint32 `json:"owe24"`
|
||||||
|
Owe5 uint32 `json:"owe5"`
|
||||||
Total uint32 `json:"total"`
|
Total uint32 `json:"total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ func TestStatistics(t *testing.T) {
|
||||||
assert.Equal(uint32(35), obj.Clients.Wifi)
|
assert.Equal(uint32(35), obj.Clients.Wifi)
|
||||||
assert.Equal(uint32(30), obj.Clients.Wifi24)
|
assert.Equal(uint32(30), obj.Clients.Wifi24)
|
||||||
assert.Equal(uint32(8), obj.Clients.Wifi5)
|
assert.Equal(uint32(8), obj.Clients.Wifi5)
|
||||||
|
assert.Equal(uint32(10), obj.Clients.Owe)
|
||||||
|
assert.Equal(uint32(5), obj.Clients.Owe24)
|
||||||
|
assert.Equal(uint32(6), obj.Clients.Owe5)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testfile(name string, obj interface{}) {
|
func testfile(name string, obj interface{}) {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
"clients": {
|
"clients": {
|
||||||
"total": 35,
|
"total": 35,
|
||||||
|
"owe": 10,
|
||||||
|
"owe24": 5,
|
||||||
|
"owe5": 6,
|
||||||
"wifi": 35,
|
"wifi": 35,
|
||||||
"wifi24": 30,
|
"wifi24": 30,
|
||||||
"wifi5": 8
|
"wifi5": 8
|
||||||
|
|
Loading…
Reference in New Issue