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

Feat/nokia opticalpower multilane #13165

Conversation

kterobinson
Copy link
Contributor

Description: Adding support for Nokia multilane optics in the dBm sensor.

DO NOT DELETE THE UNDERLYING TEXT

Please note

Please read this information carefully. You can run ./lnms dev:check to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Kate Robinson seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kterobinson
Copy link
Contributor Author

Screen Shot 2021-01-21 at 1 54 34 PM

@@ -11,3 +11,6 @@
*/

$pre_cache['timos_oids'] = snmpwalk_cache_multi_oid($device, 'tmnxDigitalDiagMonitorEntry', [], 'TIMETRA-PORT-MIB', 'timos');
$pre_cache['timos_lane_oids'] = snmpwalk_cache_multi_oid($device, 'tmnxPortEntry', [], 'TIMETRA-PORT-MIB', 'timos');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put these in the discovery file and not in pre-cache. They aren't shared across modules at all. Using pre-cache for data like this makes things slower.

* tmnxDDMLaneRX(TX)OpticalPower is in tmnxDDMLaneEntry which is in table tmnxDDMLaneTable
* snmpbulkwalk -m +ALL -M +/opt/librenms/mibs/nokia -v [snmpversionnumber] -c [communitystring] devicename -On tmnxPortSFPNumLanes
**/
foreach ($pre_cache['timos_lane_oids'] as $index => $entry) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like these could be done in yaml: https://docs.librenms.org/Developing/os/Health-Information/

@murrant murrant added Device 🖥️ New or added device support Needs Tests 🦄 https://docs.librenms.org/Developing/os/Test-Units/ labels Aug 24, 2021
@label-actions
Copy link

label-actions bot commented Aug 24, 2021

Please add test data so we can ensure your change is not broken in the future.

Read the docs to find out how: https://docs.librenms.org/Developing/os/Test-Units

@librenms-bot
Copy link

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/add-support-for-mutli-lane-optics-for-nokia-timos/14658/3

$numlanes = snmpwalk_cache_multi_oid($device, 'tmnxPortEntry', [], 'TIMETRA-PORT-MIB', 'timos');
$lanes = snmpwalk_cache_multi_oid($device, 'tmnxDDMLaneEntry', [], 'TIMETRA-PORT-MIB', 'timos');

foreach ($numlanes as $index => $entry) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we walk tmnxPortTable first and not just walk tmnxDDMLaneTable?

If you think we need to walk tmnxPortTable, you really only use tmnxPortSFPNumLanes, so just walk that.

@murrant
Copy link
Member

murrant commented Sep 4, 2021

Thanks for the updates.

I have some more suggestions. Additionally, if my suggestions work, we can definitely move this to yaml.

@murrant
Copy link
Member

murrant commented Oct 19, 2021

Thanks for your pull request. You haven't updated this PR in some time. Closing it for now. I could help out a bit if there was test data.

Please feel free to reopen, I would love to see your changes added to LibreNMS.

@murrant murrant closed this Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Device 🖥️ New or added device support Needs Tests 🦄 https://docs.librenms.org/Developing/os/Test-Units/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants