Do not pool virtual interfaces

Hello again,

On my routers, sometimes, I have up to 100000 virtual interfaces. Therefore the snmp on this equipments uses 99% of my routers processor during the pool. I wrote this configuration in config.php to ignore these interfaces but the poller.php still pool all the virtual interfaces.

$ Config [‘bad_if_regexp’] [] = ‘/Virtual-Access[0-9]./’;
$ Config [‘bad_ifname_regexp’] [] = '/Vi[0-9].
$ Config [‘bad_ifalias_regexp’] [] = ‘/ PPPoE collection /’;

How can I ignore these interfaces ?

Thanks for your help.


I have already tried this but as the interfaces are ignored by default, they are not in the MySQL query: select device_id, count (*) as total from ports where deleted = 1

I can’t enable the virtual interfaces and disable it after, Librenms will not support all these data.

Is it possible to configure ports to pool or not ?

“So to counter this you can enable ‘selected port polling’ per device within the edit device -> misc section”

I don’t have this option, I only have :

  • Disable ICMP Test?
  • Exclude from Oxidized?
  • Unix agent port
  • Enable RRD Tune for all ports?

Your install isn’t up to date then.

Now it is up to date and ‘Enable selected port polling?’ is ok.

Because as I understood the interfaces need to be in ‘disabled’ or ‘deleted’ to not be pooled. However, right now one of my devices has 25300 virtual interfaces. I can not allow them and delete them after. Librenms will explode. Moreover, these virtual interfaces often change, it would be impossible to manage.

So do you have a way to pool only the ports needed ?

I’m pretty certain all the config you mentioned at the start actually does is mark the ports as deleted, we don’t have any dbDelete calls in ports polling or disco to remove them.

The ports are not marked as deleted.

This is really a problem for me because it kills my router’s processors.

Thanks for your help anyway.

Then post the output on pastebin of:

./discovery.php -h HOSTNAME -d -m ports
./poller.php -h HOSTNAME -d -m ports -r -f


./discovery.php -h HOSTNAME -d -m ports :

./poller.php -h HOSTNAME -d -m ports -r -f

This is a little proof of concept so not something we’d merge in straight away but please test this patch by running:

cd /opt/librenms/; wget; git apply ports

Let me know how you get on.


Sorry for the delay.

I have tested your patch but I have a problem. When I use the option “Enable selected port polling?” all my ports turn off in Librenms. (It did not do that before). So they are no longer polled. However if I turn off and reactive the option and I run the poll just after (before the ports were desactivated) it seems to work.

I will provide an output as soon as possible.

Thank you very much for your time and your precious help.

./poller.php -h HOSTNAME -d -m ports before ports deletion:

./poller.php -h HOSTNAME -d -m ports after ports deletion:

I tidied up this patch and submitted a pull request, if you can test that instead please. You will need to remove what you have by doing git checkout includes/polling/ Then you can use the info in the PR below to test.

1 Like


It seems to work :slight_smile:

Thanks for all !

I will let you know how it’s get on in a few days.

Hello Benoit,

We have the same problem with cisco ASR. We have on ASR 20000 virtual interfaces. The snmp on the ASR uses 99% of router processor during the pool. Please advice us how to fix this problem. I think you have the solution for this problem.

Note: We don’t need to monitor the virtual interfaces.

Thanks & Best Regards,

If you don’t need to monitor virtual interfaces set them to ignored

Hi Kevin,

Thank you for your reply. The problem that the pool take time because the too many virtual interfaces on the device and the snmp on the device use 99% of router processor. I mean the CPU. The high CPU utilization on the device affect the service. I mean the internet service for the connected users on the device. Any help how to fix this problem.

Best Regards,