twampyre plugin | dns
The dns plugin performs DNS resolution checks (A/AAAA records) using the dnspython library to measure DNS responsiveness and availability. It runs in threaded execution mode and supports querying custom nameservers.
This plugin is suitable for monitoring DNS reachability and delay within cloud-native, containerized, or hybrid environments.
Note
The plugin resolves domain names using the specified DNS record type and records metrics on success, failure, and latency.
✨ Key Features
- Threaded plugin using
dnspython - Measures response time for
A(IPv4) orAAAA(IPv6) queries - Optional custom nameserver configuration
- Detects:
- Successful resolution
- NXDOMAIN (domain does not exist)
- Timeout
- NoAnswer (valid domain, but no records)
- Records structured metrics for each resolution attempt
⚖ License
Licensed under the BSD 3-Clause License.
🧩 Plugin Configuration
The dns plugin currently has no plugin-level options, but this may change in future versions.
🧪 Session Parameters
The following parameters are configured per test session (per target):
| Name | Type | Default | Description |
|---|---|---|---|
| record_type | str | "A" |
DNS record type to query (A or AAAA) |
| nameserver | str (optional) | None |
Custom DNS server IP address to query |
🛠 Usage Example
plugins:
dns: {}
kinds:
webhost:
dns:
interval: 5.0
timeout: 2.0
record_type: A
targets:
www.google.com:
kind: webhost
dns:
nameserver: 8.8.8.8