DNS Service Detector

The DNSDetector lets you find DNS services for monitoring in your network. A DNS service is detected when the node responds to a DNS query for an A resource record. You can customize the A record used in the query with the lookup configuration parameter.

Use the command line tool host to simulate the detector:

> host -v -t a www.google.com 8.8.8.8
Trying "www.google.com"
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9324
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.			IN	A

;; ANSWER SECTION:
www.google.com.		283	IN	A	74.125.232.17
www.google.com.		283	IN	A	74.125.232.20
www.google.com.		283	IN	A	74.125.232.19
www.google.com.		283	IN	A	74.125.232.16
www.google.com.		283	IN	A	74.125.232.18

Received 112 bytes from 8.8.8.8#53 in 41 ms

Detector facts

Implementation

org.opennms.netmgt.provision.detector.datagram.DnsDetector

Configuration and use

Table 1. Optional parameters for the DNSDetector
Parameter Description Default value

port

Port to query.

53

lookup

Name to query.

localhost

Example configuration

<detector name="DNS" class="org.opennms.netmgt.provision.detector.datagram.DnsDetector">
  <parameter key="port"   value="53"/>
  <parameter key="lookup" value="localhost"/>
</detector>