scaleway / netbox-netprod-importer

Poll data from network devices in production and import it into netbox
GNU General Public License v3.0
101 stars 31 forks source link

Whitelist/blacklist interface names #4

Open XioNoX opened 5 years ago

XioNoX commented 5 years ago

Juniper devices have a lot of system interfaces that don't make sens for us to be imported.

It would be useful to be able to define both a whitelist and blacklist of interfaces names pattern we want to import. For example in my scripts, I do pattern matching on the following: interfaces_whitelist = ['et-', 'xe-', 'ge-', 'ae', 'fxp', 'gr-', 'lo0', 'vme', 'reth', 'st', 'me0', 'em0'] interfaces_blacklist = ['.32767', '.32768', '.16386', '.16385', '.16384', 'fxp2', 'bme'] Both white and black are needed to prevent some system sub-interfaces.

aruhier commented 5 years ago

Hi, Thanks a lot for the feedback. It could be interesting indeed. I could add some regex to whitelist/blacklist interfaces as you did.

XioNoX commented 5 years ago

Piggybacking on that feature request. Similarly it would be useful to ignore link-local fe80:: and similar IPs not configured by a user.