This extension documentation is now deprecated and will no longer be updated. We recommend using the new CoreDNS extension for improved functionality and support.
CoreDNS is an open source DNS server, based on plugins provided by all major cloud vendors. CoreDNS also integrates with Kubernetes. Dynatrace OneAgent connects to the Prometheus endpoint exposed in CoreDNS to ingest the metrics.
CoreDNS is enabled by default for your environment. If necessary, you can disable CoreDNS monitoring at the host level.
OneAgent collects metrics for your CoreDNS server via the Prometheus endpoint exposed by an active Prometheus plugin.
OneAgent attempts to collect the CoreDNS metrics from the default Prometheus endpoint for CoreDNS installed alongside OneAgent, that is localhost:9153
.
If the CoreDNS Prometheus plugin exposes metrics at a non-default port, OneAgent will attempt to autodiscover the port by analyzing the CoreDNS configuration and will update the port accordingly.
Prometheus endpoint autodiscovery doesn't work in two cases:
In such cases, or when for some reason OneAgent fails to autodiscover the endpoint, Dynatrace will display a configuration error in Settings > Monitoring > Monitored technologies > CoreDNS and you'll need to provide a working endpoint in the CoreDNS monitoring settings. You can define the Prometheus endpoint for the whole environment or a single host.
Use the following format:
localhost:9999
,127.0.0.1:9999
,:9999
<container-ip-address>:9153
<dns-service-ip-address>:9153
The full Prometheus endpoint URL is localhost:9999/metrics
, but adding /metrics
path is optional.
In Dynatrace, search for the CoreDNS process. With additional extension-based monitoring, the Process overview page contains the CoreDNS metrics and Further details tabs. Select CoreDNS metrics to analyze the key metrics such as Average request duration. Select Further details to see charts for more DNS resolution-related metrics as well as Go metrics in its own dedicated tab.