dns
Tracks incoming and outgoing DNS traffic, providing various metrics and details about the DNS queries and responses.
Capabilities
The dns
plugin requires the CAP_SYS_ADMIN
capability.
CAP_SYS_ADMIN
is used to create a network tracer which invokes a tail call for updating theProgramArray
map -NewTracer()
method atdns_linux:50
Architecture
This plugin uses Inspektor Gadget's DNS Tracer to track DNS traffic and generate basic metrics derived from the captured events.
In Advanced mode, the plugin further processes the capture results into an enriched Flow with additional Pod information. Subsequently, the Flow is transmitted to an external channel. This allows a DNS module to generate additional Pod-Level metrics.
Code locations
- Plugin and eBPF code: pkg/plugin/dns/
- Module for extra Advanced metrics: pkg/module/metrics/dns.go
Metrics
See metrics for Basic Mode or Advanced Mode.