Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing metrics for "device/uplink" #585

Open
muffl0n opened this issue Jul 26, 2023 · 2 comments
Open

Missing metrics for "device/uplink" #585

muffl0n opened this issue Jul 26, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers, common problem

Comments

@muffl0n
Copy link

muffl0n commented Jul 26, 2023

Unpoller seems to be missing metrics for the uplink (speed) of devices. At least I could not find any that contain speed or uplink and are related to what I'm searching for.

To clarify what I mean, here's a example with httpie and jq:

# http --session unifi https://unifi.internal/api/s/default/stat/device | jq '.data[] | "\(.name): \(.uplink.speed)/\(.uplink.max_speed)"'
"Diele: 1000/1000"
"Flur DG: 100/1000"

Here, one can see that "Flur DG" is not running at full speed. Something I'd like to write an alert for.

Am I missing the obvious?

@muffl0n
Copy link
Author

muffl0n commented Jul 26, 2023

Debug output

2023/07/26 20:33:41.978686 updateweb.go:219: [DEBUG] Requesting https://unifi.internal/api/stat/sites, with params: false, cookies: 2
2023/07/26 20:33:41.991017 updateweb.go:219: [DEBUG] Requested https://unifi.internal/api/stat/sites: elapsed 12ms, returned 710 bytes
2023/07/26 20:33:41.991627 updateweb.go:219: [DEBUG] Found 1 site(s): default
2023/07/26 20:33:41.991680 updateweb.go:219: [DEBUG] Polling Controller, retreiving UniFi Clients, site Default (default)
2023/07/26 20:33:41.991802 updateweb.go:219: [DEBUG] Requesting https://unifi.internal/api/s/default/stat/sta, with params: false, cookies: 2
2023/07/26 20:33:42.000793 updateweb.go:219: [DEBUG] Requested https://unifi.internal/api/s/default/stat/sta: elapsed 9ms, returned 13657 bytes
2023/07/26 20:33:42.005086 updateweb.go:219: [DEBUG] Requesting https://unifi.internal/api/s/default/stat/device, with params: false, cookies: 2
2023/07/26 20:33:42.025853 updateweb.go:219: [DEBUG] Requested https://unifi.internal/api/s/default/stat/device: elapsed 21ms, returned 57100 bytes
2023/07/26 20:33:42.031996 updateweb.go:219: [DEBUG] Unmarshalling Device Type: uap, Model: U7LT, site Default (default)
2023/07/26 20:33:42.044990 updateweb.go:219: [DEBUG] Unmarshalling Device Type: uap, Model: U7LT, site Default (default)
2023/07/26 20:33:42.071233 logger.go:18: [INFO] UniFi Measurements Exported. Site: 1, Client: 10, UAP: 2, USG/UDM: 0, USW: 0, DPI Site/Client: 0/0, Desc: 132, Metric: 852, Err: 0, 0s: 275, Req/Total: 73.4ms / 92.7ms

The two APs seem to be found correctly.

@irdkwmnsb
Copy link

Such a must have for this tool!
Metrics for the uplink and downlink connections are very important and are a great way to alert if a cable for example had gone bad.

@platinummonkey platinummonkey added enhancement New feature or request good first issue Good for newcomers, common problem labels Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers, common problem
Projects
None yet
Development

No branches or pull requests

3 participants