Quick one - Autodiscovery excludes

Hi all,

Quick question - is it possible to exclude devices from autodiscovery via regex or similar?

I have a number of devices located at 172.20.x.10 that throw the SNMP discovery engine for a loop - it seems to freeze solid. They’re ControlByWeb WebRelay single units - they have no SNMP support, only the higher-end models with multiple ins/outs (superfluous to our needs) have SNMP.

I’d like to not have to add a $config[‘autodiscovery’][‘nets-exclude’][] = ‘172.20.x.10/32’; line for all 255 subnets to my configuration if I can avoid it - is it possible to do a regex match of some sort?


You don’t say which type of auto discovery :slight_smile: arp, xDP, bgp, etc?

Ah, sorry - I’m doing an SNMP scan through the scan php file, that may be re-run semi-frequently.

In that case no, we only know the IP before hand so have nothing to regex match on. I’m assuming they are dotted around and not in one subnet where you can just do /24?

Yeah :frowning: They all have the same first two octets and last octet, however - 172.20.x.10, we’ve assigned a /24 to each site that has one of these devices and they’re all on .10 of that /24.

The SNMP scanner gets hung up on them and locks up solid whenever it hits one; here’s the output from running it against one (with SNMP details redacted and -v): https://pastebin.com/ccCxFQNt

It just freezes up solid and never goes anywhere… Very odd. Am I waiting for an exceptionally long SNMP timeout?

In the meantime I just used a shell script to iterate 254 excludes into config.php. Not pretty, but it works, I guess.

Have you just added:

$config['autodiscovery']['nets-exclude'][] = '';
$config['autodiscovery']['nets-exclude'][] = '';
$config['autodiscovery']['nets-exclude'][] = '';


I think that’s the only way I’m afraid.

Yup - no worries, if that’s what I’ve gotta do that’s what I’ve gotta do :slight_smile: