# DNS

[Open dashboard](https://my.tuna.am/monitors)

The DNS monitor checks the correctness of DNS records and domain resolution.

***

## How it works

1. The system performs a DNS query for the specified domain
2. Checks the presence and value of DNS records
3. If the conditions are not met — a notification is sent

***

## Parameters

### Description

| Parameter       | Description                   | Required |
| --------------- | ----------------------------- | -------- |
| **Name**        | Unique monitor name           | Yes      |
| **Description** | A note about the task purpose | No       |

![screenshot with monitor description](/docs/img/monitors/description.png)

### Details

| Parameter   | Description                | Default    |
| ----------- | -------------------------- | ---------- |
| **Domain**  | IP address or domain       | -          |
| **Timeout** | Maximum response wait time | 10 seconds |
| **Retries** | Number of retries on error | 3          |

![screenshot with details of the DNS monitor](/docs/img/monitors/details_dns.png)

### Checks

The DNS monitor supports various response checks:

![screenshot with check parameters of the DNS monitor](/docs/img/monitors/check_dns.png)

tip

For **MX** records the metric is specified through a colon, as in the screenshot above.

### Regions

Choose one or more regions for the check. The monitor will send requests from each selected region at the specified interval.

| Parameter    | Description     | Default   |
| ------------ | --------------- | --------- |
| **Interval** | Check frequency | 5 minutes |

![screenshot with monitor region](/docs/img/monitors/region.png)

### Notifications

Here you can specify contact groups for notifications. If left unspecified, the user's email is used.

You can also set a waiting period — **Grace Period**. It is added to the expected time of the next signal. For example, if the interval is 5 minutes and the Grace Period is 2 minutes, the alert will be sent 7 minutes after the last signal. Repeated notifications remind you of the problem; you can set the interval and number of these reminders.

![screenshot with monitor job details](/docs/img/monitors/notify.png)

***

## DNS record types

The DNS monitor supports checking the following record types:

| Type      | Description                           | Example value                         |
| --------- | ------------------------------------- | ------------------------------------- |
| **A**     | IPv4 address                          | `93.184.216.34`                       |
| **AAAA**  | IPv6 address                          | `2606:2800:220:1:248:1893:25c8:1946`  |
| **CNAME** | Canonical name (alias)                | `www.example.com`                     |
| **MX**    | Mail server                           | `mail.example.com.:10`                |
| **TXT**   | Text record                           | `v=spf1 include:_spf.google.com ~all` |
| **NS**    | Name server                           | `ns1.example.com`                     |
| **SOA**   | Start of Authority                    | —                                     |
| **PTR**   | Pointer (reverse DNS)                 | `example.com`                         |
| **SRV**   | Service record                        | `0 5 5269 xmpp.example.com`           |
| **CAA**   | Certification Authority Authorization | `0 issue "letsencrypt.org"`           |
