# CoreDNS Integration

Xitoring's CoreDNS integration simplifies monitoring by automatically collecting key DNS metrics, providing real-time insights into DNS request handling, cache performance, and overall server health. This integration enables rapid identification and resolution of DNS-related issues, ensuring reliable and efficient DNS services.

# Enable CoreDNS integration

To enable CoreDNS integration, execute the following command on the server where CoreDNS is installed:

```bash
xitogent integrate
```

Select **CoreDNS** from the list of available integrations. Xitogent will automatically generate the configuration file at `/etc/xitogent/integrations/coredns_integration.conf` and immediately begin collecting metrics.

> **Note** Xitogent expects CoreDNS metrics to be exposed via the standard Prometheus metrics endpoint (usually at `http://localhost:9153/metrics`). Ensure CoreDNS is configured to expose metrics at this endpoint.

# Setup Triggers for CoreDNS integration

Use Triggers to transform raw CoreDNS metrics into actionable alerts. Recommended trigger patterns include:

- **High DNS Panic Rate**  
  - _Condition_: `coredns_panics_total > 0` within 5 min
- **Cache Performance Alert**  
  - _Condition_: `coredns_cache_hit_percentage < 80` within 10 min

# Next steps

- Create dashboards to visualize DNS request trends, response rates, and cache efficiency.
- Correlate CoreDNS metrics with server resource usage metrics to quickly diagnose performance bottlenecks.
