Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-7115

Message Error in DnsMonitor

    XMLWordPrintable

    Details

      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

      https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-services/src/main/java/org/opennms/netmgt/poller/monitors/DnsMonitor.java

      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.

        Attachments

          Activity

            People

            • Assignee:
              seth Seth Leger
              Reporter:
              carter Carter Moore
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5 minutes
                5m
                Remaining:
                Remaining Estimate - 5 minutes
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified