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:
David Bauer 2020-04-01 12:12:58 +02:00 committed by genofire
parent d4c898d1c9
commit 4944790e06
3 changed files with 9 additions and 0 deletions

View File

@ -63,6 +63,9 @@ type Clients struct {
Wifi uint32 `json:"wifi"`
Wifi24 uint32 `json:"wifi24"`
Wifi5 uint32 `json:"wifi5"`
Owe uint32 `json:"owe"`
Owe24 uint32 `json:"owe24"`
Owe5 uint32 `json:"owe5"`
Total uint32 `json:"total"`
}

View File

@ -20,6 +20,9 @@ func TestStatistics(t *testing.T) {
assert.Equal(uint32(35), obj.Clients.Wifi)
assert.Equal(uint32(30), obj.Clients.Wifi24)
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{}) {

View File

@ -1,6 +1,9 @@
{
"clients": {
"total": 35,
"owe": 10,
"owe24": 5,
"owe5": 6,
"wifi": 35,
"wifi24": 30,
"wifi5": 8