Update wifi clients polling to support more than 2 radios #4913

Merged
merged 1 commit into from Nov 8, 2016

Projects

None yet

5 participants

@jquagga
Contributor
jquagga commented Nov 1, 2016

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

PR #4846 updated the wireless clients graph with a while() loop to graph as many radios as rrd files are provided. This PR updates the wifi polling code to generate as many rrd files as $wificlients# are provided by the polling. In short, it eliminates the bottleneck for the day when APs have more than 2 radios.

Also while I was here, I updated the UBNT-Unifi polling code to use the UniFi MIB since it is now in LibreNMS. I feel it makes that section of code a tiny bit more readable.

While referencing the internet on how to convert $wificlients1 to ${'wificlients'.$i} pretty much everything said "You don't want this; you want to use an array". I could modify this to make $wificlients1 and $wificlients2 into $wificlients[1] and $wificlients[2] I think if that's preferable. That would involve changing more lines, but doesn't seem like a big deal. I just tend to approach my changes as changing as little as possible to accomplish my goals. So I started here.

I don't think there's any rush on this as presently there aren't any devices being polled which have a $wificlients3 or greater. It's just to resolve the issue for the day when 802.11ad or whatever adds another radio.

@jquagga jquagga Update wifi clients polling to support more than 2 radios
e2542a6
@scrutinizer-notifier

The inspection completed: No new issues

@laf
laf approved these changes Nov 1, 2016 View changes
@murrant
murrant approved these changes Nov 8, 2016 View changes
@laf laf merged commit ea70365 into librenms:master Nov 8, 2016

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment