Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 1.12.9
-
Fix Version/s: 15.0.0
-
Component/s: Polling / Monitors / Outages
-
Security Level: Default (Default Security Scheme)
-
Labels:None
Description
DNS Monitor (org.opennms.netmgt.poller.monitors.DnsMonitor) Returns wrong message for alarm.
Created a DNS Monitor for google.ca which contains 4 A Name records
;; ANSWER SECTION:
google.ca. 3 IN A 173.194.33.183
google.ca. 3 IN A 173.194.33.191
google.ca. 3 IN A 173.194.33.175
google.ca. 3 IN A 173.194.33.184
I set the monitor for
<parameter key="min-answers" value="1" />
<parameter key="max-answers" value="3 />
The outage message returned was:
DNS outage identified on interface xx.xx.xx.xx with reason code: Response contained 4 answer(s), but 1 or fewer answers(s) are needed..
According to the code, it appears to be using the wrong param in the error message
if (tooManyAnswers)
{ status = PollStatus.unavailable("Response contained " + numAnswers + " answer(s), but " + minAnswers + " or fewer answers(s) are needed."); LOG.warn(status.getReason()); return status; }I'm guessing this should have been 'maxAnswers' instead which would have then produced the following error message:
DNS outage identified on interface xx.xx.xx.xx with reason code: Response contained 4 answer(s), but 3 or fewer answers(s) are needed..
Second, Should this really be worded as an "outage"? Just seems weird sounding to me since the server is returning records in this case, too many of them.