Override Port description for description parsing

I’m working on description parsing to use with a custom port type i’ve created, but in some scenario’s i cant adjust the description of a specific interface on the device to be correctly reflected in LibreNMS. For example on a Windows interface i have a few network services behind a singe interface, so in LibreNMS the description parsing is including three different graphs for the same interface.

In the port settings inside LibreNMS the description box doesn’t appear to have any effect on description parsing from my testing which i was hoping would had overridden the true interface description. Anyone have any experience around this?

I’m not following what your issue is, however some examples might help to understand the issue more.

Hey Laf, see the attached two pictures. In this Windows server we have only a single interface, but in LibreNMS it see’s it as three separate interfaces. So when I do description parsing on this interface (SCCM-) it adds all three interfaces to the list of ports to graph of in the description parser. In my testing by going to the LibreNMS ‘device > Settings > Port Settings’ the Description box appears has no effect on description parsing, only what the device is reporting in the polling. If i change the descripion on LibreNMS GUI it still does description parsing to what its pulling from the device is what im finding. Is there any suggestions how i can exclude these other two interfaces from description parsing?

image

Note: I modified the port-descr-parser.inc.php to do - instead of : as Windows doesn’t allow : in it’s interface naming

I would see what the info is for each of those ports within the DB then ignore them so they don’t get discovered:

Look in the database at the data for the ports table and those 3 interfaces.

1 Like

For the record your suggestion did the job and i now know how to ignore ports. I added the following to config.php which matches those specific interfaces from their interface description including some other interfaces that have Enhancer-0000.

$config[‘bad_if_regexp’] = [‘/Filter-0000/’, ‘/Enhancer-0000/’];

Thanks!

No worries, you can also configure that in the WebUI I think, makes things easier for later upgrades

Ahh now i see it in the GUI (Cog > Global Settings > Discovery > Ports Module) bugger wish i found this sooner :sweat_smile:

Thanks again Laf

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.