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.

Try: http://docs.librenms.org/Support/Performance/#per-port-polling-experimental

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

Hi,

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

https://gist.githubusercontent.com/BenoitJ76/a23c74a7e5854bc4d625ecfcec80ff7f/raw/8da80f8ebdd5b1de0992d8147d90d89fc24c6ea5/discovery.dump

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

https://gist.githubusercontent.com/BenoitJ76/561be301ea4ac38d654935a972ee1f65/raw/af29bdbcc3e3571a95612d9444d139b048ba7521/poller.dump

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 https://gist.githubusercontent.com/laf/8fe6dc330e403bb27b32090fbb4b8213/raw/f2a1ff0111c4622e62ef1a54dd51adfd8f111f78/ports; git apply ports

Let me know how you get on.

Hello,

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:

https://gist.githubusercontent.com/BenoitJ76/fdc6d2a8d8b291d0d6a01ebbce96250c/raw/f29005173e926a1cde1ed51871f00a9d28dc8126/pollerA.dump

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

https://gist.githubusercontent.com/BenoitJ76/732c80806f45b535a259ca12ab7bdeee/raw/36c81b07c482ec5c49f9e67ed6aab81cac6b9373/pollerB.dump

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/ports.inc.php. Then you can use the info in the PR below to test.

https://github.com/librenms/librenms/pull/6037

1 Like

Hello,

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,
Saleh

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,
Saleh