Ports Group Management, the same as Devices Group Management

I’ve run a number of commercial NMS systems for different carrier/datacenter providers, and there is just one main feature I think LibreNMS is missing: true Ports Groups.
You should think about Ports Groups the same way you think about Devices Groups. You should be able to create groups based on almost any attribute in the ‘ports’ mysql table: ifAlias, ifName, ifSpeed, ifType, ifMtu, etc…

For example: create a Ports Group of all 100G ifSpeed ports on the network that have “bbone” in the ifAlias and are ifType ieee8023adLag.

One way this could be implemented is by adding a “Add Port Group” button to the search results page at /ports. You could also implement it the same way that Device Groups are managed today with the nice sql table dropdown menu (love it).

Ports groups would be stored in a table similar to device_groups. Would need to add a “Port Groups” dropdown menu under Ports, similar to the “Device Groups” dropdown.

Thanks for considering my suggestion. I think it would be very useful for everyone!


Any feedback on this idea? I can think of multiple use-cases for port groups. For example, create a port group of all ports for a specific customer, then create an alert rule that directly alerts the customer when any of the ports in their port group go down, hit thresholds, etc.

I perfectly understand the use case. But I cannot tell how easy/difficult it would be to implement.
And last but not least, this project is community based, means you and me. So unless somebody decides to come with a Pull Request in the project github… Don’t hesitate to go for it, and look on how devices groups were implemented as a base to do it.

1 Like

I love this idea, I’ll have a go at implementing this.

1 Like

I can see that this is practically the same as a feature req. submitted back in 2017 as well: Feature request: Add port group based on pattern - Feature Requests - LibreNMS Community

Not sure if an admin can roll these up?

What is the status on this? Is this something you’re still working on @nmanzi ?

Port Groups exist in LibreNMS, but they need more refinement.

Right. If they had the same flexibility device groups have, getting ports classified into port groups would be pretty trivial.

Currently you can do a description parser, but that’s custom code rather than just rules like device groups, and even with that it looks like you set the type field in the port DB record, but I don’t see anything mapping from there to port groups. The whole problem would be solved without any need for custom code if you could define rules for port groups like you do for device groups.

Yes, that is the polish that is needed. No one has contributed it though.