I am trying to parse interface descriptions to use the customer, peering, and transit ports. In my specific case, I have roughly 4 transit ports and 2 peering ports. I attempt to play around with the ’ $config[‘transit_descr’] ’ or ’ $config[‘peering_descr’] ’ in the config.php without much success. I even put in the entire port description onto each line for the " transit_descr " and LibreNMS continues to tell me that there are no transit ports.
For what it’s worth, our description are much longer compared to what is being parsed on LibreNMS (as in when clicking on Ports, the full description is cutoff). I am unsure if that is causing difficulty for me?
Anyway to get peering/transit/customer interface description parsed and shown? The documentation is a little light unfortunately.
‘TransitA’ is an exact copy of the interface description from my router, etc etc.
Only difference is that TransitA is about 90 characters long, TransitB maybe 70 characters long, etc.
I expect at least it was that those config options overwrite one another because they are just defining strings. You need to do $config['transit_descr'][] = 'TransitA'; and so on to ensure it’s an array
My issue was attempting to apply the parser into our description standardization on our devices. The key function I missed while reading was the colon " : " placement.
After that, everything clicked in.
I am aware of creating my own custom parser, however I am not skillful in any programming/scripting…
to the right of the colon is where LibreNMS detects your server name (or customer name, or whatever you like).
Optionally, you can add speed, notes, other useful information by parsing them around specific variables:
THIS_IS_MY_PORT_DESCRIPTION: CUSTOMER NAME [SPEED] {CIRCUIT ID}
So you speed of 100M would show as " [100M] ", circuit ID would shown as " {random circuit ID} ", and your customer description of the port would be without any markings in the beginning and end.
The URL pasted by laf does go into those details further.