DNS Monitoring

Configuration

For DNS Monitoring we require a target to be configured on the Prometheus Config.

- job_name: coredns scrape_interval: 5s metrics_path: /metrics static_configs: - targets: ['kube-dns.kube-system.svc:9153']

The default Metrics port is: 9153, if you change this, remember to update the target Port. The default service for dns does not expose this port however, so you need to add this to the dns service configuration under specs, ports:

- name: metrics protocol: TCP port: 9153 targetPort: 9153

 

The full object is as follows:


spec: ports: - name: dns protocol: UDP port: 53 targetPort: 53 - name: dns-tcp protocol: TCP port: 53 targetPort: 53 - name: metrics protocol: TCP port: 9153 targetPort: 9153

 

Dashboard

There are numerous dashboards available to monitor Core DNS, the one we’re using has to code: 5926