Scrape and inspect each pod's HTTP listener, normally port 8080. The DaemonSet includes Prometheus scrape annotations. The management Service can distribute requests across replicas; aggregate metrics with a pod/instance label and inspect individual pods when diagnosing disagreement.
Health and status
| Endpoint | Meaning |
|---|---|
/livez |
HTTP process availability; returns 200 if this handler responds. |
/readyz |
200 after valid configuration, successful local synchronization, a valid local TSIG key and initial attempts to all configured peers; otherwise 503, including shutdown. |
/api/status |
JSON containing responding podID and detailed status. |
/api/keys |
Local/remote credential summaries, reload errors and resource versions; no private secret in summaries. |
/api/peers |
Responding pod's peer transfer state. |
/metrics |
Prometheus text exposition. |
An unreachable peer does not block startup forever: attempts have endpoint deadlines, and missing data warms on later retries. Later peer/source failures retain last-good records and need freshness monitoring even when the pod is ready. See architecture for lifecycle details.
Important status fields are clusterID, podID, configVersion, localSynced,
lastSync, lastError, configError, discoveryError, ready, records, revision
and tsig. configError concerns configuration loading/change detection/validation;
lastError concerns local generated-source synchronization. records counts effective
source records, rather than every synthetic SOA/NS record a DNS reply can contain.
Compare revisions and timestamps along with errors. A revision is meaningful in its own
source context, rather than a global transaction number across clusters.
Inspect one pod
Use an authorized Kubernetes context. Replace POD_NAME with a selected pod:
kubectl -n tak-os-dns get pods -l app=tak-os-dns
kubectl -n tak-os-dns port-forward pod/POD_NAME 8080:8080
In another terminal:
curl -i http://127.0.0.1:8080/readyz
curl -fsS http://127.0.0.1:8080/api/status
curl -fsS http://127.0.0.1:8080/api/peers
curl -fsS http://127.0.0.1:8080/api/keys
curl -fsS http://127.0.0.1:8080/metrics
Keep port-forward bound to loopback. It uses Kubernetes authorization and reaches the management listener directly, bypassing the authenticated Ingress. That listener permits configuration writes as well as inspection.
Logs
The process writes structured JSON logs to stdout. Inspect startup, configuration, resource-sync and listener errors using platform log collection or:
kubectl -n tak-os-dns logs -l app=tak-os-dns --prefix --tail=100
Peer transfer failures are exposed through /api/peers and peer metrics; the peer
manager does not write structured transfer-error logs.
Optional query logging records query name, type, response code and duration. The
queryLogging setting is persisted in configuration and propagates to the cluster's
pods. Enable it for a bounded investigation and disable it afterwards; queried names may
be sensitive. Retention, access and log shipping belong to the platform. Runtime TSIG
secrets are excluded from management configuration responses.
Metrics
Counters reset when a pod restarts. Timestamp gauges are omitted before the first success, so alert on absence as well as stale timestamps where appropriate.
| Metric | Type / labels | Interpretation |
|---|---|---|
tak_dns_queries_total |
Counter; type, rcode |
Completed ordinary query handling; excludes early rate/concurrency rejection and peer handling. |
tak_dns_query_duration_seconds |
Histogram | Same completed operations; _bucket, _sum, _count. |
tak_dns_source_updates_total |
Counter | Successful local refreshes, including unchanged snapshots. |
tak_dns_source_failures_total |
Counter | Failed local source refreshes or configuration reads/change detection/validation. |
tak_dns_source_last_success_timestamp_seconds |
Gauge | Unix time of last successful local update. |
tak_dns_ready |
Gauge | Current readiness, 0 or 1. |
tak_dns_cache_records |
Gauge | Effective source-record count. |
tak_dns_requests_total |
Counter | All DNS handler entries, including peer requests. |
tak_dns_limited_total |
Counter | Rate or concurrency admission rejections. |
tak_dns_listener_failures_total |
Counter | Listener/write failures and oversized reply failures. |
tak_dns_peer_up |
Gauge; peer |
Last complete peer attempt succeeded, 0 or 1. |
tak_dns_peer_transfers_total |
Counter; peer |
Successful peer attempts, including unchanged checks. |
tak_dns_peer_failures_total |
Counter; peer |
Failed complete peer passes. |
tak_dns_peer_last_success_timestamp_seconds |
Gauge; peer |
Unix time of the last successful peer attempt. |
Query histogram boundaries in seconds are 0.0001, 0.0005, 0.001, 0.005, 0.01,
0.05, 0.1, 1 and +Inf. The type label is one of A, AAAA, CNAME, DNAME, SOA, NS,
MX, TXT, SRV, PTR, CAA or ANY, with OTHER for other input. Names and client addresses
are not metric labels; peer labels use configured peer identities.
Initial alerts
Choose durations and thresholds from measured workload and the startup budget:
- Readiness remains zero longer than expected local startup and peer attempts.
- Local last-success age exceeds several
POLL_INTERVALs, or source failures persist. - A configured peer remains down, has no success timestamp, or its timestamp is older than the convergence objective. Serving retained records is intentional.
- Listener failures or admission rejections rise above the established baseline.
- SERVFAIL/REFUSED or tail query latency rises. Completely unknown names return REFUSED and known missing types return NOERROR/NODATA; correlate its rate with expected traffic rather than treating every negative reply as an error.
For example, time() - tak_dns_source_last_success_timestamp_seconds measures local
update age, and rate(tak_dns_source_failures_total[5m]) measures recent failures. Use
histogram bucket rates for latency quantiles. The query histogram does not include
client network latency, rejected requests or peer transfers.
Mesh and key lifecycle checks
Separate missing credentials from network failures: peer status exposes
pendingCredentials, disabled, reason and discoveryError. Discovery errors do not
reverse a successful record publication. Pending/disabled initial checks complete
readiness but do not imply imported data. Inspect PeerSite provenance,
status.sources/status.paths and direct-discovery markers alongside active endpoints.
Repeated unchanged topology need not advance lastDiscovery; it is not a heartbeat
metric.
status.tsig and /api/keys expose reload errors, fingerprints and weak-key warnings.
Never scrape the explicit private export as a monitoring endpoint. Compare fingerprints
across pods after rotation, and inspect intended receivers for recovered transfers after
operator-managed credential distribution. Retained records and a previous lastSuccess
remain observable during credential failure.
The top-level status.discoveryError concerns this site's local advertised
endpoint/topology reads. A failure keeps its previous advertisement. Each peer's
discoveryError instead concerns that remote site's topology fetch/persistence; its
valid DNS record transfer can still succeed. Check both scopes separately from local
source lastError/configError and credential errors under status.tsig.
Distinguish negative outcomes when sampling DNS replies: completely unknown names return REFUSED; known missing types return authoritative NOERROR/NODATA. The metric rcode=NOERROR includes both positive and NODATA replies, so the RCODE counter alone cannot distinguish them. SOA presence depends on zone settings, not whether the missing-type response is authoritative. No NXDOMAIN is generated by the ordinary serving path.
