telegraf/plugins/inputs/dns_query/README.md

56 lines
1.0 KiB
Markdown
Raw Normal View History

# DNS Query Input Plugin
2016-02-13 18:00:42 +00:00
The DNS plugin gathers dns query times in miliseconds - like [Dig](https://en.wikipedia.org/wiki/Dig_\(command\))
### Configuration:
```
# Sample Config:
[[inputs.dns_query]]
## servers to query
servers = ["8.8.8.8"]
2016-02-13 18:00:42 +00:00
## Network is the network protocol name.
# network = "udp"
## Domains or subdomains to query.
# domains = ["."]
2016-02-13 18:00:42 +00:00
## Query record type.
## Posible values: A, AAAA, CNAME, MX, NS, PTR, TXT, SOA, SPF, SRV.
# record_type = "A"
2016-02-13 18:00:42 +00:00
## Dns server port.
# port = 53
## Query timeout in seconds.
# timeout = 2
2016-02-13 18:00:42 +00:00
```
For querying more than one record type make:
2016-02-13 18:00:42 +00:00
```
[[inputs.dns_query]]
2016-02-13 18:00:42 +00:00
domains = ["mjasion.pl"]
servers = ["8.8.8.8", "8.8.4.4"]
record_type = "A"
2016-02-13 18:00:42 +00:00
[[inputs.dns_query]]
2016-02-13 18:00:42 +00:00
domains = ["mjasion.pl"]
servers = ["8.8.8.8", "8.8.4.4"]
record_type = "MX"
2016-02-13 18:00:42 +00:00
```
### Tags:
- server
2016-02-13 18:00:42 +00:00
- domain
- record_type
2016-02-13 18:00:42 +00:00
### Example output:
```
telegraf --input-filter dns_query --test
> dns_query,domain=mjasion.pl,record_type=A,server=8.8.8.8 query_time_ms=67.189842 1456082743585760680
2016-02-13 18:00:42 +00:00
```