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: Cambium cnPilot Support #7898

Merged
merged 5 commits into from Dec 26, 2017

Conversation

Projects
None yet
4 participants
@pheinrichs
Contributor

pheinrichs commented Dec 11, 2017

The cnPilot routers(cnpilotr) don't have a lot of info coming from the mibs. The E model have much better mibs and I've included a few wireless sensors to start it off, will need testing though.

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

Fixes: #7894

@pheinrichs pheinrichs changed the title from Cambium cnPilot Support to device: Cambium cnPilot Support Dec 11, 2017

*/
$version = trim(snmp_get($device, '.1.3.6.1.4.1.41010.1.1.1.0', '-OQv'), '"');

This comment has been minimized.

@murrant

murrant Dec 11, 2017

Member

You don't need to trim quotes anymore, snmp_get does that.

group: cambium
discovery:
-
sysDescr_regex:

This comment has been minimized.

@murrant

murrant Dec 11, 2017

Member

For completeness I would add sysObjectId: .1.3.6.1.4.1.17713.22 here.

This comment has been minimized.

@pheinrichs

pheinrichs Dec 11, 2017

Contributor

This device's sysObjectId only returns .1.3.6.1.4. which is basically useless otherwise i would have included it.

group: cambium
discovery:
- sysObjectId:
- .1.3.6.1.4.1.17713.22

This comment has been minimized.

@murrant

murrant Dec 11, 2017

Member

I would also add sysDescr_except: '/(cnPilot R[0-9][0-9][0-9])/i' here.

*/
public function discoverWirelessPower()
{
$oid = '.1.3.6.1.4.1.17713.22.1.2.1.8.0'; //CAMBIUM-MIB::cambiumRadioTransmitPower.0

This comment has been minimized.

@murrant

murrant Dec 11, 2017

Member

When I looked a the MIB a bit earlier, I noticed these are table entries. Could there be more than one point of data returned (multiple radios)?

Do you have a device to test or are you just adding based on the MIB @pheinrichs ?

This comment has been minimized.

@pheinrichs

pheinrichs Dec 11, 2017

Contributor

I don't have any devices to test on the cnpilot-e devices. This is purely on the mib

@@ -0,0 +1 @@
1.3.6.1.2.1.1.1.0|4|cnPilot R201 4.3.3-R4

This comment has been minimized.

@murrant

murrant Dec 11, 2017

Member

Please add both sysObjectID and sysDescr for snmprec files.

This comment has been minimized.

@pheinrichs

pheinrichs Dec 11, 2017

Contributor

Same situation as above. SysObjectID is a bust...

This comment has been minimized.

@murrant

murrant Dec 12, 2017

Member

@pheinrichs We need to include them otherwise our testing will be worthless. It should match what the device returns.

icon: cambium
mib_dir: cambium
over:
- { graph: device_bits, text: 'Device Traffic' }

This comment has been minimized.

@murrant

murrant Dec 11, 2017

Member

I like to add the client count to wireless devices overview:

- { graph: device_wireless_clients, text: 'Number of Clients' }
use LibreNMS\Interfaces\Discovery\Sensors\WirelessNoiseFloorDiscovery;
use LibreNMS\OS;
class Pmp extends OS implements

This comment has been minimized.

@murrant

murrant Dec 11, 2017

Member

Class name is wrong. Should be Cnpilote

@murrant

This comment has been minimized.

Member

murrant commented Dec 11, 2017

Mib files should be the name of the mib (without txt). I noticed both have the same it doesn't look as if they are the same (man, vendors are bad at snmp). Possibly we need to store them in different directories to prevent name collisions.

$version = $poll_device['sysDescr'];
$hardware = snmp_get($device, '.1.3.6.1.4.1.17713.22.1.1.1.10', '-OQv');

This comment has been minimized.

@laf

laf Dec 11, 2017

Member

Can we not use the MIBs here and then use snmp_get_multi_oid()?

*/
$version = snmp_get($device, '.1.3.6.1.4.1.41010.1.1.1.0', '-OQv');

This comment has been minimized.

@laf

laf Dec 11, 2017

Member

Can we not use the MIBs here and then use snmp_get_multi_oid()?

@laf

This comment has been minimized.

Member

laf commented Dec 11, 2017

Mib files should be the name of the mib (without txt). I noticed both have the same it doesn't look as if they are the same (man, vendors are bad at snmp). Possibly we need to store them in different directories to prevent name collisions.

Can do that by putting them in sub folders and specifying both in the yaml.

Or we could just use two different names in the same folder, the filename is just to make it easier to reference - I'd vote with sub folders

pheinrichs added some commits Dec 12, 2017

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Dec 12, 2017

The inspection completed: 2 new issues, 5 updated code elements

@laf laf added this to the 1.35 milestone Dec 15, 2017

@laf

laf approved these changes Dec 15, 2017

@laf

laf approved these changes Dec 15, 2017

LGTM

@laf laf removed this from the 1.35 milestone Dec 26, 2017

@laf laf merged commit d9169c6 into librenms:master Dec 26, 2017

2 checks passed

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

This comment has been minimized.

lock bot commented May 16, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 16, 2018

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