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: Added detection for Cisco SPA devices #8446

Merged
merged 2 commits into from Mar 29, 2018

Conversation

Projects
None yet
4 participants
@laf
Member

laf commented Mar 21, 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

Fixes: #8128

@laf laf added the Device 🖥 label Mar 21, 2018

@tracernz

This comment has been minimized.

Contributor

tracernz commented Mar 26, 2018

Neat. I will test this if you like (I have an SPA112 at home). 👍

@tracernz

This comment has been minimized.

Contributor

tracernz commented Mar 27, 2018

I don't think the system oid is correct. The one you have used doesn't exist:

$ snmpwalk -v2c -cpublic ata.bertie.nz 1.3.6.1.4.1.9.6.1.23.1.1
iso.3.6.1.4.1.9.6.1.23.1.1 = No Such Object available on this agent at this OID
$ snmpwalk -v2c -cpublic ata.bertie.nz | grep SPA   
iso.3.6.1.2.1.25.1.4.0 = STRING: "console=ttyS1,115200n8 rootfstype=squashfs noalign half_image=0 verify=y Hw_Model=SPA112 Router_Mode=0
iso.3.6.1.2.1.47.1.1.1.1.2.1 = STRING: "SPA112, 2 FXS"
iso.3.6.1.2.1.47.1.1.1.1.7.1 = STRING: "SPA112"
iso.3.6.1.2.1.47.1.1.1.1.13.1 = STRING: "SPA112"

Discovery: https://p.libren.ms/view/de12d1e9
Poller: https://p.libren.ms/view/ec796a52
Bulk walk: https://p.libren.ms/view/9512ae68

I might have some time to look at this more on Friday.

@laf

This comment has been minimized.

Member

laf commented Mar 27, 2018

@tracernz That's not how OIDs work. Look in your snmpwalk output and you will see the OID is returned from sysObjectID

@tracernz

This comment has been minimized.

Contributor

tracernz commented Mar 27, 2018

My bad. I always assumed it was a pointer.

The sysDescr regex doesn't look right (mine returns "Linux ata 2.6.26.5 #1 PREEMPT Wed Aug 2 14:04:45 CST 2017 armv5tejlI"). I wonder if @thetravellor's hostname was set to SPA112? Mine is "ata".

@tracernz

This comment has been minimized.

Contributor

tracernz commented Mar 27, 2018

Confirmed that the sysDescr string is Linux <hostname> 2.6.26.5 #1 PREEMPT Wed Aug 2 14:04:45 CST 2017 armv5tejl (hostname is configured in Network Setup > Basic Setup > Internet Settings).

sysObjectID:
- .1.3.6.1.4.1.9.6.1.23.1.1.1
sysDescr_regex:
- '/^(CISCO|Linux) SPA/'

This comment has been minimized.

@murrant

murrant Mar 29, 2018

Member

Why check the sysDescr? It seems as though that can vary quite a bit.

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Mar 29, 2018

The inspection completed: No new issues

@murrant murrant added this to the 1.38 milestone Mar 29, 2018

@murrant murrant merged commit 250b02f into librenms:master Mar 29, 2018

2 checks passed

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

This comment has been minimized.

Contributor

tracernz commented Mar 29, 2018

Works great. 👍

@laf laf deleted the laf:device/issue-8128 branch Mar 29, 2018

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

device: Added detection for Cisco SPA devices (librenms#8446)
* device: Added detection for Cisco SPA devices

* Drop sysDescr check

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

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