The DNS Observer is installed as part of the core installation procedure. Using the DNS
Observer, you can query internal DNS server performance, and use the returned information on
response times and service addresses to create topologies within the topology service. The DNS
Observer supports forward and reverse lookup calls, with recurse or no recurse
options.
Before you begin
Ensure you have the DNS access details to hand, such as domain, DNS server address and port
number.
Remember: Swagger documentation for the observer is available at the following default
location: https://<your
host>/1.0/dns-observer/swagger
About this task
The DNS Observer (nasm-dns-observer) provides DNS query services and topological insight into how
a specified DNS server is performing forward (name-to-IP address) or reverse (IP address-to-name)
lookups. Query results include a list of addresses, information on how long it takes the DNS server
to resolve a lookup, and, optionally (with the maximum number of recursive calls set at 200) how the
DNS server is recursively resolving a given name or IP address.
Job data is automatically posted to the topology service, after which the job status expires,
after a set amount of time. The Topology Viewer displays the results with color-coded lines
representing the relationships between resources, and the lookup time in ms. A tabular view of the
relationship details is also available.
- dns_observer_common.sh
- The configuration file you use to customize DNS Observer settings.
- The parameters defined here are then used by the DNS forward and reverse lookup scripts
(dns_observer_forward_lookup_start.sh and
dns_observer_reverse_lookup_start.sh) to trigger the DNS Observer jobs.
-
Tip: Alternatively, you can set the appropriate environment variables. If an environment
variable is set, it takes precedence over the configuration file settings.
You define and start the following jobs. You must edit the parameters in the configuration file
before running these jobs.
- Forward lookup job
- A transient (one-off) job that loads all requested DNS forward lookup topology data.
- This job is started by the dns_observer_forward_lookup_start.sh
script.
- Reverse lookup job
- A transient (one-off) job that loads all requested DNS reverse lookup topology data.
- This job is started by the dns_observer_reverse_lookup_start.sh
script.
Procedure
-
Open the dns_observer_common.sh configuration file and edit the required
parameters.
- type
- Values can be either forward for name-to-IP address lookups, or reverse for IP
address-to-name lookups.
- address_type
- IPV4 or IPV6
- server
- The DNS server IP address
- port
- The DNS server port number
- recurse
- Values can be false to run the job without recursion, or true
to initiate recursion, with the maximum number of calls set at 200.
- domain_name
- The domain name for the DNS forward lookup job
- ip_address
- The IP address for the DNS reverse lookup job
Run the jobs
-
To start the DNS forward lookup job, use the following command:
$ASM_HOME/bin/dns_observer_forward_lookup_start.sh
-
To start the DNS reverse lookup job, use the following command:
$ASM_HOME/bin/dns_observer_reverse_lookup_start.sh
Results
Data retrieved from the DNS query is displayed in the Agile Service Manager Topology
Viewer.
Example
Example of a
forward DNS Observer job
with no recursive
lookup:
{
"unique_id": "my job",
"type": "forward",
"parameters": {
"address_types": "IPV4",
"server": "8.8.8.8",
"port": 53,
"recurse": false,
"domain_name": "yourdomain.com"
}
}
Example of a
reverse DNS Observer job
with recursive
lookup:
{
"unique_id": "my job",
"type": "reverse",
"parameters": {
"address_types": "IPV4",
"server": "8.8.8.8",
"port": 53,
"recurse": true,
"ip_address": "8.8.8.8"
}
}
What to do next
You can also use the following scripts:
- dns_observer_lookup_stop.sh
- Stops the DNS observer lookup job
- dns_observer_job_list.sh
- Lists the status of current jobs
- dns_observer_log_level.sh
- Sets the log level
Remember: In addition to being configurable from the Observer Configuration UI,
all on-prem observer jobs also have scripts to start and stop all available jobs, to list the status
of a current job, and to set its logging levels. Scripts can be run with -h or
--help to display help information, and with -v or
--verbose to print out the details of the actions performed by the script,
including the full cURL command. For the on-prem version of Agile Service Manager, observer scripts
are configured for specific jobs by editing the script configuration files.