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

Device: Add add mempols and cpu for ArubaOS controllers #8548

Merged
merged 14 commits into from Apr 12, 2018

Conversation

Projects
None yet
4 participants
@slashdoom
Contributor

slashdoom commented Apr 11, 2018

DO NOT DELETE THIS TEXT

Please note

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

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

@@ -5,6 +5,8 @@ icon: aruba
over:
- { graph: device_arubacontroller_numaps, text: 'Number of APs' }
- { graph: device_arubacontroller_numclients, text: 'Number of Clients' }
mib_dir:

This comment has been minimized.

@laf

laf Apr 11, 2018

Member

This isn't actually needed. The os name is used as a mib dir by default if it exists.

processors:
data:
-
oid: WLSX-SYSTEMEXT-MIB::sysExtProcessorLoad

This comment has been minimized.

@laf

laf Apr 11, 2018

Member

Is this a table as the supervisor card cpu one below would also get picked up in this.

This comment has been minimized.

@slashdoom

slashdoom Apr 11, 2018

Contributor

I was trying to do this to override the description for the .1 OID. Maybe there's a better way?

walk of : .1.3.6.1.4.1.14823.2.2.1.2.1.13.1
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.1 = STRING: Supervisor Card CPU
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.8 = STRING: Network Processor CPU8
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.9 = STRING: Network Processor CPU9
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.10 = STRING: Network Processor CPU10
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.11 = STRING: Network Processor CPU11
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.12 = STRING: Network Processor CPU12
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.13 = STRING: Network Processor CPU13
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.14 = STRING: Network Processor CPU14
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.2.15 = STRING: Network Processor CPU15
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.1 = INTEGER: 2
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.8 = INTEGER: 0
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.9 = INTEGER: 1
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.10 = INTEGER: 0
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.11 = INTEGER: 0
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.12 = INTEGER: 0
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.13 = INTEGER: 0
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.14 = INTEGER: 0
.1.3.6.1.4.1.14823.2.2.1.2.1.13.1.3.15 = INTEGER: 0

.1 always seems to be Supervisor Card CPU and the rest are Network Processor CPU{{ $index }}.

This comment has been minimized.

@laf

laf Apr 11, 2018

Member

Does it override the supervisor card cpu as you expect?

If so let's leave it at that.

You need to move the WLSX-SYSTEMEXT-MIB to the mib: line at the top: ARUBA-MIB:WLSX-SYSTEMEXT-MIB

This comment has been minimized.

@slashdoom

slashdoom Apr 12, 2018

Contributor

Yeah, override looks good on the graphs...
image

This comment has been minimized.

@laf

laf Apr 12, 2018

Member

We'll go with that for now. Only way round it would be to add an option to discard based on indexes. However we shall see if we need to cross that bridge when more devices need it.

* @author Patrick Ryon (Slashdoom) <patrick@slashdoom.com>
*/
/*

This comment has been minimized.

@laf

laf Apr 11, 2018

Member

You can delete these comments.

if ($device['os'] === 'arubaos') {
echo 'ARUBAOS-MEMORY-POOL: ';
$total = snmp_get($device, 'sysXMemorySize.1', '-OvQ', 'WLSX-SWITCH-MIB');

This comment has been minimized.

@laf

laf Apr 11, 2018

Member

Please convert these three snmp_get() into one snmp_get_multi_oid().

* @author Patrick Ryon (Slashdoom) <patrick@slashdoom.com>
*/
/*

This comment has been minimized.

@laf

laf Apr 11, 2018

Member

Can drop these comments again.

echo 'ARUBAOS-MEMORY-POOL: ';
$memory_pool = snmp_get_multi_oid($device, 'sysXMemorySize.1 sysXMemoryUsed.1 sysXMemoryFree.1', '-OQUs', 'WLSX-SWITCH-MIB');

This comment has been minimized.

@laf

laf Apr 11, 2018

Member

Yup - do this in discovery as well :)

@laf

This comment has been minimized.

Member

laf commented Apr 11, 2018

Thanks for this, can you also provide test data for these new modules: https://docs.librenms.org/#Developing/os/Test-Units/#example-workflow

slashdoom added some commits Apr 11, 2018

slashdoom
slashdoom
@slashdoom

This comment has been minimized.

Contributor

slashdoom commented Apr 12, 2018

Test files added though I'm not sure how well they worked. The script threw some errors throughout. Ended with:

FAILURES!
Tests: 768, Assertions: 15680, Failures: 25.
Cleaning database...
MySQL Error: Access denied; you need (at least one of) the SUPER privilege(s) for this operation (SET GLOBAL sql_mode='')
snmpsimd: output at /tmp/snmpsimd.logRunning style check... success
Running lint check... success
@murrant

This comment has been minimized.

Member

murrant commented Apr 12, 2018

@slashdoom Looks good, but you've only include test data for the os module. You should also include mempolls and processors as you've added them in this PR.

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Apr 12, 2018

The inspection completed: No new issues

@laf

laf approved these changes Apr 12, 2018

@laf laf merged commit 041de7e into librenms:master Apr 12, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@slashdoom slashdoom deleted the slashdoom:arubaos-add-mem-cpu branch Apr 12, 2018

@slashdoom slashdoom referenced this pull request Apr 13, 2018

Merged

Fix: ArubaOS mempool scale fix #8557

1 of 1 task complete

TheMysteriousX added a commit to TheMysteriousX/librenms that referenced this pull request May 20, 2018

device: Added mempols and cpu for ArubaOS controllers (librenms#8548)
* arubaos mempools discovery

* arubaos mempools poller

* add mibs_dir to yaml

* discovery typo

* correct filenames might help

* remove debugs

* fix

* arubaos processor yaml

* processor yaml with sup cpu override

* remove mib_dir to use default mib search

* requested cleanup items

* WLSX-SYSTEMEXT-MIB added to mib line

* added test files

* update tests with mempools and processors info

@lock lock bot locked as resolved and limited conversation to collaborators Jun 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.