matching on hostname with MatchingIpInterfacePolicy provisioning policy
2012-06-22 14:05:06 GMT
Hi all,
I've the following provisioning policy:
<policies>
<policy class="org.opennms.netmgt.provision.persist.policies.MatchingIpInterfacePolicy" name="auto_discovery">
<parameter value="MANAGE" key="action"/>
<parameter value="ALL_PARAMETERS" key="matchBehavior"/>
<parameter value="*" key="ipAddress"/>
</policy>
<policy class="org.opennms.netmgt.provision.persist.policies.MatchingIpInterfacePolicy" name="block_128_classA_subnet">
<parameter value="UNMANAGE" key="action"/>
<parameter value="ALL_PARAMETERS" key="matchBehavior"/>
<parameter value="~128\..*" key="ipAddress"/>
</policy>
<policy class="org.opennms.netmgt.provision.persist.policies.MatchingIpInterfacePolicy" name="block_test_servers">
<parameter value="DO_NOT_PERSIST" key="action"/>
<parameter value="ALL_PARAMETERS" key="matchBehavior"/>
<parameter value="~.*test.*" key="hostName"/>
</policy>
</policies>
New interfaces are correctly discovered, and interfaces in the range 128.0.0.0/8 are correctly set to UNMANAGE. But, interfaces whose IP address resolves to a hostname containing the word 'text' are still persisted in the DB.
Does anyone know what I'm doing wrong?
Best regards,
Cyrille
PS: I've activated DEBUG log level on PROVISIOND, but can't see there where in the code this matching is performed:
2012-06-20 15:32:04,260 INFO [Provisiond:EventListener]
EventIpcManagerDefaultImpl: run: calling onEvent on
Provisiond:EventListener for event
uei.opennms.org/internal/discovery/newSuspect dbid 222315 with time
mercredi 20 juin 2012 13:32:04 GMT
2012-06-20 15:32:04,260 INFO [pool-1-thread-4] Provisioner: createNewSuspectScan called
2012-06-20 15:32:04,260 INFO [scanExecutor-6] NewSuspectScan: Attempting to scan new suspect address 10...........
2012-06-20 15:32:04,352 INFO [scanExecutor-6] AddEventVisitor: Sending
nodeAdded Event for [OnmsNode <at> 5fd1102f id = 160, label =
'linservtest.fw.......', parent.id = 'null', createTime = Wed Jun 20
15:32:04 CEST 2012, sysObjectId = [null], sysName = [null],
sysDescription = [null], sysLocation = [null], sysContact = [null], type
= 'A', operatingSystem = [null]]
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-discuss mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-discuss
RSS Feed