Include/Exclude range
Description
Environment
OpenNMS 1.10.3
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Benjamin Reed July 30, 2012 at 12:06 PM
Yeah, looks like there was a validation update for https://opennms.atlassian.net/browse/NMS-4701#icft=NMS-4701 between 1.8 and 1.10 that caused this.
Fixed in the 1.10 and master branches.
In the meantime, you can edit $OPENNMS_HOME/etc/discovery-configuration.xml directly, or, edit $OPENNMS_HOME/jetty-webapps/opennms/admin/discovery/add-er.jsp and change this:
function checkIpRange(ip1, ip2){
if (verifyIPv4Address(ip1) && verifyIPv4Address(ip2)) {
var a = v4BigInteger(ip1);
var b = v4BigInteger(ip2);
return b > a;
}
if (verifyIPv6Address(ip1) && verifyIPv6Address(ip2)) {
var a = new v6.Address(ip1).bigInteger();
var b = new v6.Address(ip2).bigInteger();
return b.compareTo(a) > 0;
}
return false;
}
to this:
function checkIpRange(ip1, ip2){
if (verifyIPv4Address(ip1) && verifyIPv4Address(ip2)) {
var a = v4BigInteger(ip1);
var b = v4BigInteger(ip2);
return b >= a;
}
if (verifyIPv6Address(ip1) && verifyIPv6Address(ip2)) {
var a = new v6.Address(ip1).bigInteger();
var b = new v6.Address(ip2).bigInteger();
return b.compareTo(a) >= 0;
}
return false;
}
(ie, turn the two return statements using a greater-than to instead use greater-than-or-equal-to)
...and it should work.
Sistemas Startic July 30, 2012 at 11:54 AM
If I modify the discovery-configuration.xml and I send the uei.opennms.org/internal/discoveryConfigChange event the exclude list shows the unique IP address in the begging and end fields correctly.
Fixed
Details
Assignee
Benjamin ReedBenjamin ReedReporter
Sistemas StarticSistemas StarticComponents
Fix versions
Affects versions
Priority
Minor
Details
Details
Assignee
Benjamin Reed
Benjamin ReedReporter
Sistemas Startic
Sistemas StarticComponents
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

PagerDuty Incident
Created July 30, 2012 at 11:31 AM
Updated January 27, 2017 at 4:21 PM
Resolved July 30, 2012 at 12:06 PM
Dear support,
I've readed here: http://www.opennms.org/wiki/Discovery "There is no "specific" version of the exclude tag - if you want to exclude a specific IP address use an exclude-range where the beginning and ending IP addresses are the same. "
Anyway, when I try add an same IP (in the begining and ending address), I get an: "Address Range not valid."
I try the same operation with the Include Range (the same IP in the begining and ending address) and I get the same error.
The openNMS's version is 1.10.3, but other IRC's user in the #opennms channel detects the same behaviour in 1.10.4.