StackState-DNS Service Check

Overview

The DNS Service Check allows you to monitor the resolution of host names against a specified DNS server. This will allow you to monitor the availability and response times of your DNS infrastructure, as well as validate that key host names are resolvable.

Setup

Configuration

To configure the DNS Service Check, edit the dns_check.yaml file in your conf.d directory.

    init_config:
      default_timeout: 4

    instances:
      - hostname: www.example.org
        nameserver: 127.0.0.1
        timeout: 8

Validation

To validate that the DNS Service Check is working, run sudo /etc/init.d/stackstate-agent info. You should see something like the following:

Checks
======

  [...]
  dns_check
  ---------
    - instance #0 [OK]
    - Collected 1 metric, 0 events & 2 service checks

Data Collected

Metrics

This check tags all metrics it collects with:

  • nameserver:<nameserver_in_yaml>
  • resolved_hostname:<hostname_in_yaml>
dns.response_time
(gauge)
The response time for DNS query for a given record, tagged by hostname, e.g. 'hostname:example.com'.
shown as second

Service Check

This check tags all service checks it collects with:

  • nameserver:<nameserver_in_yaml>
  • resolved_hostname:<hostname_in_yaml>

You may use one service check to check the DNS availability of your host:

  • dns.can_resolve