ipMatch regular expression

I have 3 detector, loop98 is normal use, loop98Regex and loopRegexAll are using Regex:

    <detector name="loop98" class="org.opennms.netmgt.provision.detector.loop.LoopDetector">
         <parameter key="ipMatch" value="192.168.2.98"/>
    </detector>
    <detector name="loop98Regex" class="org.opennms.netmgt.provision.detector.loop.LoopDetector">
         <parameter key="ipMatch" value="~192.168.2.9[0-9]"/>
    </detector>
    <detector name="loopRegexAll" class="org.opennms.netmgt.provision.detector.loop.LoopDetector">
         <parameter key="ipMatch" value="~.*"/>
    </detector>

After nodeScanCompleted, only loop98 will be discovered on the interface.

Expected results:
loopRegexAll and loop98Regex can be discovered during the rescan or the synchronize phase.

Version:
Meridian 2020.1.3

ipMatch doesn’t take a regex. it performs an iplike match, e.g. 192.169.2.90-99 or *.*.*.* would match your second and third example, respectively.

1 Like