telegraf/plugins/inputs/dns_query
Zack Zatkin-Gold 61be19b1f0 Fix telegraf example arguments (#2788)
Many of the examples provided within documentation are using a single
dash for the command line arguments, but the telegraf executable
explicitly has two dashes.

There are also some inconsistencies with the ordering of the command
line argument examples.  I've ordered them so that the examples will
show: config, config-directory, input-filter, test
2017-05-12 15:22:29 -07:00
..
README.md Fix telegraf example arguments (#2788) 2017-05-12 15:22:29 -07:00
dns_query.go use AddError everywhere (#2372) 2017-04-24 11:13:26 -07:00
dns_query_test.go use AddError everywhere (#2372) 2017-04-24 11:13:26 -07:00

README.md

DNS Query Input Plugin

The DNS plugin gathers dns query times in miliseconds - like Dig

Configuration:

# Sample Config:
[[inputs.dns_query]]
  ## servers to query
  servers = ["8.8.8.8"] # required

  ## Domains or subdomains to query. "." (root) is default
  domains = ["."] # optional

  ## Query record type. Posible values: A, AAAA, ANY, CNAME, MX,  NS, PTR, SOA, SPF, SRV, TXT. Default is "NS"
  record_type = "A" # optional

  ## Dns server port. 53 is default
  port = 53 # optional

  ## Query timeout in seconds. Default is 2 seconds
  timeout = 2 # optional

For querying more than one record type make:

[[inputs.dns_query]]
  domains = ["mjasion.pl"]
  servers = ["8.8.8.8", "8.8.4.4"]
  record_type = "A"

[[inputs.dns_query]]
  domains = ["mjasion.pl"]
  servers = ["8.8.8.8", "8.8.4.4"]
  record_type = "MX"

Tags:

  • server
  • domain
  • record_type

Example output:

./telegraf --config telegraf.conf --input-filter dns_query --test
> dns_query,domain=mjasion.pl,record_type=A,server=8.8.8.8 query_time_ms=67.189842 1456082743585760680