Skip to content

Added Moxa switching ifAlias/portName mapping#14633

Merged
murrant merged 2 commits intolibrenms:masterfrom
rhinoau:moxa-ether-portnames
Dec 16, 2022
Merged

Added Moxa switching ifAlias/portName mapping#14633
murrant merged 2 commits intolibrenms:masterfrom
rhinoau:moxa-ether-portnames

Conversation

@rhinoau
Copy link
Copy Markdown
Contributor

@rhinoau rhinoau commented Nov 15, 2022

The Moxa human-edited port descriptions/names are not accessible in IF-MIB.

A default port with a custom 'name' added is as below:

interface ethernet 1/5
 no shutdown
 name pr1_G1_name
 speed-duplex Auto
 media cable-mode auto
 no flowcontrol
 no gmrp
 mcast-filter forward-unknown
 switchport access vlan  1
 rate-limit port-disable ingress rate none
 no ptp
!

Event log showing some names being ingested with correct indexes:
image

I'm not excited about having to do it this way, but I need the custom port descriptions from the device.

Each Moxa EDS model has a unique MIB/sysObjectID, but is seems like stable mapping within them to the portTable at {sysObjectID}.1.9.1

I have tested across 2 models I have on my desk and they both work as intended, but with my limited PHP foo I can't find a nicer way to do it and leaving as WIP so I can learn what better ways we might find.

I'm ashamed of my OID hackery to obtain index, and had some troubles getting clean accessible info from the snmpwalk_cache_xxx variants that I could walk without tripping over.

Hoping someone may also have some other models to test against.

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.
  • If my Pull Request makes discovery/polling/yaml changes, I have added/updated test data.

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.

@rhinoau rhinoau changed the title WIP: Added Moxa switching ifAlias/portName mapping Added Moxa switching ifAlias/portName mapping Dec 3, 2022
@rhinoau
Copy link
Copy Markdown
Contributor Author

rhinoau commented Dec 3, 2022

Open to better ways, but removing WIP to progress.

@murrant
Copy link
Copy Markdown
Member

murrant commented Dec 16, 2022

I mean, it is garbage the the workaround is needed and that it is this obtuse, but I don't think there is an alternative.

@murrant murrant merged commit 03482dd into librenms:master Dec 16, 2022
@murrant murrant added the Device 🖥️ New or added device support label Dec 28, 2022
@librenms-bot
Copy link
Copy Markdown

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

https://community.librenms.org/t/22-12-0-changelog/20474/1

@rhinoau rhinoau deleted the moxa-ether-portnames branch February 4, 2025 08:10
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants