PRTG Manual: DNS Checks
The DNS monitor allows you to monitor whether a hostname resolves to a valid or correct/desired IP address. Using reverse DNS lookup, it also allows you to monitor whether an IP address resolves to the correct hostname. When a DNS monitor runs it resolves the provided hostname and compares the resulting IP address to the expected result. Or, if an IP address is specified, it does a reverse DNS lookup on the IP address and compares the resulting hostname to the expected result.
The DNS monitor editor contains the following tabs that require configuration: Settings, Schedule, Event, and History.
The Schedule, Events and History settings are the same for all monitor types. See Configuring Monitors for more information about configuring these settings. For the settings tab see the information below.
Name
The Monitor name is the name of the monitor used to refer to the monitor in the monitors list view, and in monitor events and notifications. Monitor names must not be unique but it is recommended you use unique names to differentiate them.
Host IPs/Names
The Host IPs/Names is a list of Hostnames and/or IP addresses to be resolved by the monitor.
Adding a Hostname / IP Entry
To add a new hostname or IP address to be monitored, press the add button
. An editor allowing you to configure the new Hostname / IP entry is displayed. Once configured, press the save button and the new Hostname / IP entry is added to the list.
Editing a Hostname / IP Entry
To edit a Hostname / IP entry press the edit/configure button
. The configuration editor is displayed. To save the changes press the save button and the Hostname / IP changes are applied.
Deleting a Hostname / IP Entry
To delete a Hostname / IP entry select the entry in the list and press the delete button
. The Hostname / IP entry will be removed from the list.
Configuring a Hostname / IP Entry
In the Hostname / IP field, enter the hostname or IP address that you want to monitor. If you enter a hostname, the monitor will do a forward DNS lookup to resolve the hostname to an IP address. If you enter an IP address, the monitor will do a reverse DNS lookup to resolve the IP address to a hostname. If you enter a hostname and also check the Do Reverse Lookup checkbox, the monitor will do both forward and reverse DNS lookups. (If you enter an IP address, the monitor will already do a reverse DNS lookup, so the Do Reverse Lookup checkbox has no effect.)
In the Expected Result field, you may optionally enter the expected result of the DNS lookup. (You may leave this field empty if you don’t care what the result is, as long as the lookup succeeds.) If an Expected Result is specified, after resolving the hostname or IP address specified in the Hostname / IP field, the monitor will compare the lookup result with the value in the Expected Result field. If the lookup result and the expected result do not match, the monitor will report a Down status. If a hostname was specified in the Hostname / IP field, the Expected Result should specify the IP address that you expect the forward DNS lookup to return. Or, if an IP address was specified in the Hostname / IP field, the Expected Result should specify the hostname that you expect the reverse DNS lookup to return. If you want to specify the Expected Result as a regular expression, you may do so as long as you check the Match Using RegEx checkbox. (Regular expression checking is done using the .NET regular expression library.) Comparisons between DNS lookup results and Expected Results are done in a case-insensitive manner (i.e., case does not matter).
There are six different ways to configure a Hostname / IP entry, each of which is described in the following table.
Hostname / IP |
Expected Result |
Do Reverse Lookup |
Meaning |
|---|---|---|---|
Hostname |
No |
No |
Do a forward DNS lookup to ensure that the specified hostname resolves to an IP address. Any IP address will do, because no expected result is specified. |
Hostname |
No |
Yes |
Do a forward DNS lookup to ensure that the specified hostname resolves to an IP address. Any IP address will do, because no expected result is specified. Also do a reverse DNS lookup on the resulting IP address to ensure that it resolves to the specified hostname. |
Hostname |
Yes |
No |
Do a forward DNS lookup to ensure that the specified hostname resolves to an IP address that matches the expected result. |
Hostname |
Yes |
Yes |
Do a forward DNS lookup to ensure that the specified hostname resolves to an IP address that matches the expected result. Also do a reverse DNS lookup on the resulting IP address to ensure that it resolves to the specified hostname. |
IP Address |
No |
Not applicable |
Do a reverse DNS lookup to ensure that the specified IP address resolves to a hostname. Any hostname will do, because no expected result is specified. |
IP Address |
Yes |
Not applicable |
Do a reverse DNS lookup to ensure that the specified IP address resolves to a hostname that matches the expected result. |