When polling information about ports, LibreNMS will keep historical information about removed ports (and the corresponding RRD files), filling up the disk space.
This is of course expected behavior, but some software like Docker will aggressively try to restart its containers, creating hundreds or thousands of interfaces in the process. I’ve found around 50k deleted ports on the LibreNMS instances I manage, almost all of them because of Docker.
At this point automating its purging is a bit complicated and not something I’d like doing, so I’m wondering:
- Is there an auto-purge method anywhere?
- Can the purge-deleted function be exposed in the API?
- Any other way to automate this? SNMP exception maybe?
As far as I can see, deleted-ports.inc.php removes database entries, but I can’t find the function that removes the RRD files.