Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Latest commit

 

History

History
77 lines (50 loc) · 3 KB

telegraf-dns.md

File metadata and controls

77 lines (50 loc) · 3 KB

telegraf/dns

Monitor Type: telegraf/dns (Source)

Accepts Endpoints: Yes

Multiple Instances Allowed: Yes

Overview

This is an embedded form of the Telegraf DNS Query plugin.

Configuration

To activate this monitor in the Smart Agent, add the following to your agent config:

monitors:  # All monitor config goes under this key
 - type: telegraf/dns
   ...  # Additional config

For a list of monitor options that are common to all monitors, see Common Configuration.

Config option Required Type Description
domains no list of strings Domains or subdomains to query. If this is not provided it will be ["."] and RecordType will be forced to NS.
network no string Network is the network protocol name. (default: udp)
port no integer Dns server port. (default: 53)
servers yes list of strings Servers to query.
recordType no string Query record type (A, AAAA, CNAME, MX, NS, PTR, TXT, SOA, SPF, SRV). (default: NS)
timeout no int64 Query timeout. This should be a duration string that is accepted by https://golang.org/pkg/time/#ParseDuration. (default: 2s)

Metrics

These are the metrics available for this monitor. Metrics that are categorized as container/host (default) are in bold and italics in the list below.

  • dns.query_time_ms (gauge)
    Reponse time of the query in ms.
  • dns.rcode_value (gauge)
    Error code. See this tab for detailled descriptions.
  • dns.result_code (gauge)
    Resolution result code (success = 0, timeout = 1, error = 2).

Non-default metrics (version 4.7.0+)

To emit metrics that are not default, you can add those metrics in the generic monitor-level extraMetrics config option. Metrics that are derived from specific configuration options that do not appear in the above list of metrics do not need to be added to extraMetrics.

To see a list of metrics that will be emitted you can run agent-status monitors after configuring this monitor in a running agent instance.

Dimensions

The following dimensions may occur on metrics emitted by this monitor. Some dimensions may be specific to certain metrics.

Name Description
domain The DNS domain queried.
plugin The plugin name "telegraf/dns".
record_type The DNS record type queried.
server The DNS server queried.