The only agent that thinks for itself

Autonomous Monitoring with self-learning AI built-in, operating independently across your entire stack.

Unlimited Metrics & Logs
Machine learning & MCP
5% CPU, 150MB RAM
3GB disk, >1 year retention
800+ integrations, zero config
Dashboards, alerts out of the box
> Discover Netdata Agents

Centralized metrics streaming and storage

Aggregate metrics from multiple agents into centralized Parent nodes for unified monitoring across your infrastructure.

Stream from unlimited agents
Long-term data retention
High availability clustering
Data replication & backup
Scalable architecture
Enterprise-grade security
> Learn about Parents

Fully managed cloud platform

Access your monitoring data from anywhere with our SaaS platform. No infrastructure to manage, automatic updates, and global availability.

Zero infrastructure management
99.9% uptime SLA
Global data centers
Automatic updates & patches
Enterprise SSO & RBAC
SOC2 & ISO certified
> Explore Netdata Cloud

Deploy Netdata Cloud in your infrastructure

Run the full Netdata Cloud platform on-premises for complete data sovereignty and compliance with your security policies.

Complete data sovereignty
Air-gapped deployment
Custom compliance controls
Private network integration
Dedicated support team
Kubernetes & Docker support
> Learn about Cloud On-Premises

Powerful, intuitive monitoring interface

Modern, responsive UI built for real-time troubleshooting with customizable dashboards and advanced visualization capabilities.

Real-time chart updates
Customizable dashboards
Dark & light themes
Advanced filtering & search
Responsive on all devices
Collaboration features
> Explore Netdata UI

Monitor on the go

Native iOS and Android apps bring full monitoring capabilities to your mobile device with real-time alerts and notifications.

iOS & Android apps
Push notifications
Touch-optimized interface
Offline data access
Biometric authentication
Widget support
> Download apps

The future of infrastructure observability

See our strategic direction across AI-native observability, full-stack signals, operational intelligence, and enterprise platform maturity.

AI-native observability
Full-stack signal coverage
Operational intelligence
Enterprise platform maturity
Agent releases every 6 weeks
Cloud continuous delivery
> Explore Product Roadmap

Best energy efficiency

True real-time per-second

100% automated zero config

Centralized observability

Multi-year retention

High availability built-in

Zero maintenance

Always up-to-date

Enterprise security

Complete data control

Air-gap ready

Compliance certified

Millisecond responsiveness

Infinite zoom & pan

Works on any device

Native performance

Instant alerts

Monitor anywhere

AI-native observability

Continuous delivery

Open source foundation

80% Faster Incident Resolution

AI-powered troubleshooting from detection, to root cause and blast radius identification, to reporting.

True Real-Time and Simple, even at Scale

Linearly and infinitely scalable full-stack observability, that can be deployed even mid-crisis.

90% Cost Reduction, Full Fidelity

Instead of centralizing the data, Netdata distributes the code, eliminating pipelines and complexity.

See and Map Your Entire Network

Live topology, flow analytics, and SNMP device and trap monitoring — unified with your full-stack observability.

Control Without Surrender

SOC 2 Type 2 certified with every metric kept on your infrastructure.

Integrations

800+ collectors and notification channels, auto-discovered and ready out of the box.

800+ data collectors
Auto-discovery & zero config
Cloud, infra, app protocols
Notifications out of the box
> Explore integrations
Real Results
46% Cost Reduction

Reduced monitoring costs by 46% while cutting staff overhead by 67%.

— Leonardo Antunez, Codyas

Zero Pipeline

No data shipping. No central storage costs. Query at the edge.

From Our Users
"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

No Query Language

Point-and-click troubleshooting. No PromQL, no LogQL, no learning curve.

Enterprise Ready
67% Less Staff, 46% Cost Cut

Enterprise efficiency without enterprise complexity—real ROI from day one.

— Leonardo Antunez, Codyas

SOC 2 Type 2 Certified

Zero data egress. Only metadata reaches the cloud. Your metrics stay on your infrastructure.

Full Coverage
800+ Collectors

Auto-discovered and configured. No manual setup required.

Any Notification Channel

Slack, PagerDuty, Teams, email, webhooks—all built-in.

Built for the People Who Get Paged

Because 3am alerts deserve instant answers, not hour-long hunts.

Every Industry Has Rules. We Master Them.

See how healthcare, finance, and government teams cut monitoring costs 90% while staying audit-ready.

Monitor Any Technology. Configure Nothing.

Install the agent. It already knows your stack.
From Our Users
"A Rare Unicorn"

Netdata gives more than you invest in it. A rare unicorn that obeys the Pareto rule.

— Eduard Porquet Mateu, TMB Barcelona

99% Downtime Reduction

Reduced website downtime by 99% and cloud bill by 30% using Netdata alerts.

— Falkland Islands Government

Real Savings
30% Cloud Cost Reduction

Optimized resource allocation based on Netdata alerts cut cloud spending by 30%.

— Falkland Islands Government

46% Cost Cut

Reduced monitoring staff by 67% while cutting operational costs by 46%.

— Codyas

Real Coverage
"Plugin for Everything"

Netdata has agent capacity or a plugin for everything, including Windows and Kubernetes.

— Eduard Porquet Mateu, TMB Barcelona

"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

Real Speed
Troubleshooting in 30 Seconds

From 2-3 minutes to 30 seconds—instant visibility into any node issue.

— Matthew Artist, Nodecraft

20% Downtime Reduction

20% less downtime and 40% budget optimization from out-of-the-box monitoring.

— Simon Beginn, LANCOM Systems

Pay per Node. Unlimited Everything Else.

One price per node. Unlimited metrics, logs, users, and retention. No per-GB surprises.

Free tier—forever
No metric limits or caps
Retention you control
Cancel anytime
> See pricing plans

What's Your Monitoring Really Costing You?

Most teams overpay by 40-60%. Let's find out why.

Expose hidden metric charges
Calculate tool consolidation
Customers report 30-67% savings
Results in under 60 seconds
> See what you're really paying

Your Infrastructure Is Unique. Let's Talk.

Because monitoring 10 nodes is different from monitoring 10,000.

On-prem & air-gapped deployment
Volume pricing & agreements
Architecture review for your scale
Compliance & security support
> Start a conversation

Monitoring That Sells Itself

Deploy in minutes. Impress clients in hours. Earn recurring revenue for years.

30-second live demos close deals
Zero config = zero support burden
Competitive margins & deal protection
Response in 48 hours
> Apply to partner

Per-Second Metrics at Homelab Prices

Same engine, same dashboards, same ML. Just priced for tinkerers.

Community: Free forever · 5 nodes · non-commercial
Homelab: $90/yr · unlimited nodes · fair usage
> Get the Homelab Plan

$1,000 Per Referral. Unlimited Referrals.

Your colleagues get 10% off. You get 10% commission. Everyone wins.

10% of subscriptions, up to $1,000 each
Track earnings inside Netdata Cloud
PayPal/Venmo payouts in 3-4 weeks
No caps, no complexity
> Get your referral link
Cost Proof
40% Budget Optimization

"Netdata's significant positive impact" — LANCOM Systems

Calculate Your Savings

Compare vs Datadog, Grafana, Dynatrace

Savings Proof
46% Cost Reduction

"Cut costs by 46%, staff by 67%" — Codyas

30% Cloud Bill Savings

"Reduced cloud bill by 30%" — Falkland Islands Gov

Enterprise Proof
"Better Than Combined Alternatives"

"Better observability with Netdata than combining other tools." — TMB Barcelona

Real Engineers, <24h Response

DPA, SLAs, on-prem, volume pricing

Why Partners Win
Demo Live Infrastructure

One command, 30 seconds, real data—no sandbox needed

Zero Tickets, High Margins

Auto-config + per-node pricing = predictable profit

Homelab Ready
Free Video Course

8-episode Netdata tutorial by LearnLinux.tv

76k+ GitHub Stars

3rd most starred monitoring project

Worth Recommending
Product That Delivers

Customers report 40-67% cost cuts, 99% downtime reduction

Zero Risk to Your Rep

Free tier lets them try before they buy

AI Support Assistant, Available 24/7

Nedi has access to all official documentation, source code, and resources. Ask any question about Netdata—responds in your language.

Deployment & configuration
Troubleshooting & sizing
Alerts & notifications
Evidence-based answers
> Ask Nedi now

Never Fight Fires Alone

Docs, community, and expert help—pick your path to resolution.

Learn.netdata.cloud docs
Discord, Forums, GitHub
Premium support available
> Get answers now

60 Seconds to First Dashboard

One command to install. Zero config. 850+ integrations documented.

Linux, Windows, K8s, Docker
Auto-discovers your stack
> Read our documentation

76,000+ Engineers Strong

615+ contributors. 1.5M daily downloads. One mission: simplify observability.

Per-Second. 90% Cheaper. Data Stays Home.

Side-by-side comparisons: costs, real-time granularity, and data sovereignty for every major tool.

See why teams switch from Datadog, Prometheus, Grafana, and more.

> Browse all comparisons
Edge-Native Observability, Born Open Source
Per-second visibility, ML on every metric, and data that never leaves your infrastructure.
Founded in 2016
615+ contributors worldwide
Remote-first, engineering-driven
Open source first
> Read our story
Promises We Publish—and Prove
12 principles backed by open code, independent validation, and measurable outcomes.
Open source, peer-reviewed
Zero config, instant value
Data sovereignty by design
Aligned pricing, no surprises
> See all 12 principles
Edge-Native, AI-Ready, 100% Open
76k+ stars. Full ML, AI, and automation—GPLv3+, not premium add-ons.
76,000+ GitHub stars
GPLv3+ licensed forever
ML on every metric, included
Zero vendor lock-in
> Explore our open source
Build Real-Time Observability for the World
Remote-first team shipping per-second monitoring with ML on every metric.
Remote-first, fully distributed
Open source (76k+ stars)
Challenging technical problems
Your code on millions of systems
> See open roles
Meet the Team Behind Netdata
Conferences, meetups, and tradeshows where you can see Netdata in action and talk to the engineers who build it.
Live demos and deep dives
Book 1-on-1 meetings
Talks and panel sessions
Event recaps and photos
> See all events
Talk to a Netdata Human in <24 Hours
Sales, partnerships, press, or professional services—real engineers, fast answers.
Discuss your observability needs
Pricing and volume discounts
Partnership opportunities
Media and press inquiries
> Book a conversation
Your Data. Your Rules.
On-prem data, cloud control plane, transparent terms.
Trust & Scale
76,000+ GitHub Stars

One of the most popular open-source monitoring projects

SOC 2 Type 2 Certified

Enterprise-grade security and compliance

Data Sovereignty

Your metrics stay on your infrastructure

Validated
University of Amsterdam

"Most energy-efficient monitoring solution" — ICSOC 2023, peer-reviewed

ADASTEC (Autonomous Driving)

"Doesn't miss alerts—mission-critical trust for safety software"

Community Stats
615+ Contributors

Global community improving monitoring for everyone

1.5M+ Downloads/Day

Trusted by teams worldwide

GPLv3+ Licensed

Free forever, fully open source agent

Why Join?
Remote-First

Work from anywhere, async-friendly culture

Impact at Scale

Your work helps millions of systems

$ guides / consul / consul-dns-stale-queries ▌

Operations Guides

Consul stale DNS queries: the agent is answering from cache

When consul.dns.stale_queries climbs, the Consul agent is doing what it was designed to do: keep answering DNS from local state when it cannot get a fresh answer from a server. That behavior has been the DNS default since Consul 0.7. But “stale” means two very different things depending on how stale, and why.

A stale answer two seconds old during a leader handoff is harmless availability. A stale answer five minutes old, still pointing at instances that crashed four minutes ago, is silently routing traffic to dead services. The counter alone cannot tell you which case you are in. Correlate it with agent-to-server RPC health, server health, and your consistency configuration.

This guide covers what consul.dns.stale_queries measures, the three consistency modes, the configuration knobs that control staleness, and how to tell whether a rising counter is benign or actively dangerous.

What this means

The consul.dns.stale_queries counter increments each time the agent serves a DNS response whose server LastContact is more than 5 seconds old. The threshold is the hard-coded staleCounterThreshold = 5 * time.Second; there is no knob to change it.

Staleness enters the DNS path through two distinct mechanisms with different operational meaning.

Server-side stale reads. With allow_stale = true (the default since Consul 0.7), DNS queries forwarded to a server can be answered from that server’s local FSM state, which may lag the leader. This is normal read scaling. A follower answering slightly behind the leader is the intended behavior that lets Consul distribute reads across all servers instead of pinning every read to the leader. A steady low rate of stale queries under healthy servers is this mechanism working as designed.

Agent-side cache serving. With use_cache = true, the agent caches DNS results locally and can serve them without contacting any server at all. When the agent cannot reach a server (RPC port 8300 blocked, server overloaded, network partition), it falls back to its local cache. This is the connectivity signal that matters: the agent is alive and answering DNS, but it is disconnected from the source of truth. A sudden spike that coincides with consul.client.rpc.failed rising on the same agent means the agent has lost its server connection and is serving whatever it last knew.

The counter does not distinguish between the two. Interpretation requires correlation.

flowchart TD
  Q[Client DNS query] --> A[Agent port 8600]
  A --> C{use_cache
and cache fresh?} C -->|yes| CACHE[Serve from local cache] C -->|no| R{Server reachable
on port 8300?} R -->|no| STALE[Serve stale from cache
stale_queries++] R -->|yes| F{allow_stale true
and within max_stale?} F -->|yes| ANS[Follower answers
from local FSM] F -->|no| LEADER[Forward to leader
default mode]

Consistency modes: stale, default, consistent

Consul exposes three consistency modes. DNS can use stale or default. The consistent mode is HTTP API only.

ModeWhat it doesAvailabilityFreshnessHow to select
staleAny server answers from its local FSM stateHighest; survives server loss as long as one server answersMay lag leader; bounded by max_staleDNS: allow_stale = true (default). HTTP: ?stale
defaultLeader answers via lease; fresher than staleMedium; requires leader contactClose to current; leader-verified within leaseDNS: allow_stale = false. HTTP: no param
consistentLeader performs read-index quorum check before answeringLowest; requires leader plus quorum round-tripLinearizableHTTP API only: ?consistent. Not available for DNS

The trade-off is availability against freshness. Stale mode keeps DNS answering through leader elections, server failures, and brief partitions. Default mode sacrifices that availability for answers closer to current. Consistent mode adds a quorum round-trip on every read and is too expensive for high-volume DNS paths; it exists for HTTP operations that must be linearizable, such as lock acquisition reads.

For DNS, max_stale caps how stale a stale-mode answer can be before the server refuses and forwards to the leader. Its default is 87600h (10 years) since Consul 0.7.1, which effectively means unbounded. Setting max_stale low sounds like a safe way to bound staleness, but it converts cheap follower reads into expensive leader reads. If servers are already overloaded, a low max_stale makes the overload worse. The official guidance is explicit: only set max_stale low if you prefer total unavailability over stale results.

Common causes

CauseWhat it looks likeFirst thing to check
Agent cannot reach any server via RPCstale_queries spikes; consul.client.rpc.failed rising on the same agentPort 8300 connectivity from agent to server
Server cluster lost quorumstale_queries rises across many agents; /v1/status/leader empty or flappingconsul operator raft list-peers; server process health
Server overloaded (FD exhaustion, CPU)stale_queries rises; RPC latency high; FD usage near limitFD usage on servers; iostat -x 1 on server volumes
Network partition isolating client agentsGossip still alive (port 8301 open) but RPC (8300) blockedconsul.client.rpc.failed elevated while gossip member count looks normal
use_cache serving old datastale_queries steady and non-zero; cache_max_age misconfiguredInspect dns_config block; check for cache_max_age = 0s
TLS certificate mismatch between agent and serverAgent recently restarted or certs rotated; RPC handshakes failAgent and server logs for TLS errors

Quick checks

Run these read-only checks on the agent showing the elevated counter.

# Stale query counter (run twice, 30s apart, to compute rate)
curl -s http://127.0.0.1:8500/v1/agent/metrics | grep -i stale_queries

# Agent-to-server RPC failures (the real connectivity signal)
curl -s http://127.0.0.1:8500/v1/agent/metrics | grep -i "client.rpc"

# Verify a leader exists
curl -s http://127.0.0.1:8500/v1/status/leader

# How many servers this agent knows about
curl -s http://127.0.0.1:8500/v1/agent/self | grep -A2 known_servers

# Time a direct DNS query against the local agent
dig @127.0.0.1 -p 8600 myservice.service.consul SRV +stats

# Inspect the dns_config block in the agent config
grep -E "allow_stale|max_stale|use_cache|cache_max_age|node_ttl|service_ttl" /etc/consul/*.hcl /etc/consul.d/*.hcl 2>/dev/null

If consul.client.rpc.failed is zero and the leader endpoint returns a stable address, the stale counter is most likely server-side stale reads under allow_stale = true, which is benign. If RPC failures are climbing, the agent is disconnected and the staleness is the symptom of a connectivity problem.

How to diagnose it

  1. Confirm the counter is actually rising. Pull the counter twice, 30 seconds apart, and compute the rate. A monotonically increasing counter with zero rate is just historical accumulation.

  2. Check agent-to-server RPC health. consul.client.rpc.failed should be near zero. Any sustained non-zero rate means the agent cannot push state to servers or pull fresh reads. This is the single most important correlation. If RPC failures and stale queries rise together, you have a connectivity problem, not a tuning problem.

  3. Verify server health. Check /v1/status/leader from multiple servers. If the response is empty or oscillating, the server cluster has no stable leader and all reads are necessarily stale. Check consul.raft.commitTime for write pipeline saturation and server file descriptor usage for connection exhaustion.

  4. Distinguish cache-driven staleness from server-driven staleness. If use_cache = true and cache_max_age is set, the agent serves from its local cache until the cache entry expires, then re-fetches. If the agent cannot re-fetch because the server is unreachable, it keeps serving the cached value and the counter climbs. If use_cache is not enabled, the staleness is server-side: a follower is answering behind the leader under allow_stale = true.

  5. Check for the cache_max_age = 0s trap. A value of 0s does not mean “always fresh.” It disables max-age entirely, so the agent never re-fetches based on age. The workaround documented in Consul issue #7073 is to use 1ns instead. If you intended near-immediate refresh and set 0s, you have accidentally configured permanent caching.

  6. Inspect downstream resolvers. If clients query through dnsmasq, systemd-resolved, or corporate DNS forwarders, those layers add their own caching and negative-response caching. Windows caches negative DNS responses for 15 minutes by default. A service that appears “down” to clients may be down only in a downstream cache, not in Consul itself.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
consul.dns.stale_queries (rate)Direct measure of stale answers servedSustained non-zero rate, or sudden spike
consul.client.rpc.failed (rate)Agent cannot reach servers via RPCAny sustained non-zero rate
consul.raft.commitTimeServer write pipeline healthp99 above 500ms; servers too overloaded to answer reads promptly
/v1/status/leaderLeader exists and is stableEmpty response, or address changing rapidly
consul.serf.lan.members (alive count)Gossip membershipDrop without corresponding leave event suggests partition
File descriptor usage on serversServer can accept RPC connectionsAbove 80% of ulimit
consul.dns.domain_query latencyDNS response time as seen by the agentp99 trending upward alongside rising staleness

Fixes

If the agent cannot reach a server

This is the case that matters most. Stale DNS is the symptom; broken agent-to-server connectivity is the cause.

  • Verify port 8300 connectivity from the agent to each server. A common pattern is a firewall or security group change that blocks RPC (8300) while leaving gossip (8301) open. Gossip looks healthy, but RPC is dead.
  • Check server file descriptor usage. Servers near their FD limit stop accepting new RPC connections. The agent cannot reach the server even though the server process is running.
  • Check for TLS mismatch. If certificates were rotated on servers but not on agents, RPC handshakes fail. Look for TLS errors in both agent and server logs.
  • Check server overload. If consul.raft.commitTime is elevated, servers may be too slow to handle RPC read requests, causing the agent to time out and fall back to cache.

Tuning max_stale

The default max_stale = 87600h is effectively unbounded. That is intentional: it prioritizes availability. Do not set max_stale low to “bound staleness” unless you have explicitly decided that stale answers are worse than no answers. A low max_stale under server load converts follower reads into leader reads and accelerates overload. If you need bounded staleness, the safer approach is use_cache with an explicit, non-zero cache_max_age, accepting that the agent will serve from cache when it cannot refresh in time.

use_cache and cache_max_age

use_cache enables agent-side DNS caching and implies allow_stale. With it on, the agent can serve DNS without contacting servers at all, which reduces server load and DNS latency but introduces a freshness gap controlled by cache_max_age.

  • Never use cache_max_age = 0s. It disables max-age entirely instead of meaning “always fresh.” Use 1ns if you want near-immediate re-fetch.
  • There is no stale-if-error for the DNS cache. The HTTP API agent cache supports stale-if-error semantics (return stale when servers are unreachable), but the DNS cache does not. If you need that behavior, put a caching resolver in front of Consul DNS, such as Unbound configured with serve-expired.

Downstream caching and TTLs

Consul’s default TTL for all DNS records is 0s, meaning clients do not cache and every lookup hits the agent. If you want clients to cache, set node_ttl and service_ttl explicitly. Higher TTLs increase the window in which clients hold stale results during service failures.

If clients query through systemd-resolved, on systemd v246+ you must specify the port explicitly (DNS=127.0.0.1:8600). Without the port, queries go to port 53 instead of 8600. dnsmasq and corporate forwarders add their own TTL and negative-caching behavior that can extend apparent staleness beyond what Consul reports.

Prevention

  • Monitor consul.client.rpc.failed on every agent. This is the leading indicator that stale DNS is connectivity-driven rather than load-distribution-driven. A sustained non-zero rate means the agent is disconnected and the catalog is going stale.
  • Decide your staleness policy explicitly. Document whether your deployment treats stale DNS as acceptable availability or as a correctness risk. That decision drives your allow_stale, max_stale, use_cache, and cache_max_age settings.
  • Track cache_max_age configuration across the fleet. The 0s trap is easy to hit during configuration refactors and produces no error, only silently stale answers.
  • Watch server FD usage and consul.raft.commitTime. Both are upstream causes of agents falling back to stale cache. Catching them early prevents the stale counter from spiking.
  • Validate downstream resolver behavior. If you run dnsmasq, systemd-resolved, or Unbound in front of Consul, understand their caching and negative-response behavior independently of Consul’s own metrics.

How Netdata helps

  • Per-second consul.dns.stale_queries rate shows the exact moment the counter starts climbing, not a minute-later aggregate. Correlate that timestamp with other signals to identify the trigger.
  • consul.client.rpc.failed alongside the stale counter on the same timeline is the fastest way to distinguish cache-driven staleness (connectivity problem) from server-side stale reads (normal behavior under allow_stale = true).
  • Server-side signals (consul.raft.commitTime, leader transitions, file descriptor usage, memory) let you check whether the stale DNS is caused by server overload or quorum loss without switching tools.
  • ML anomaly detection on the stale query rate separates the expected low background of stale reads from a genuine spike, reducing alert noise on a signal that is non-zero by design.
  • DNS query latency metrics show the user-facing impact. If stale DNS is keeping latency low while servers are unreachable, that is the feature working as intended. If latency is climbing alongside staleness, the agent itself is struggling.