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-cross-dc-query-failure ▌

Operations Guides

Consul cross-datacenter query failure: prepared-query failover masking a DC outage

A Consul prepared query with cross-DC failover does exactly what it was configured to do: it silently forwards lookups to a remote DC when local results are empty. Consumers receive valid service discovery results, applications keep connecting, and no error fires. The local DC may have zero healthy instances, and nobody on the consumer side knows.

The DNS response is identical whether nodes came from the local DC or a remote one. There is no EDNS flag, no source record, no indicator in the answer. Receiving results does not mean local health.

This article covers how to detect active failover, distinguish it from a genuine local outage, handle ACL replication lag in the failover target DC, and understand why Connect mesh traffic does not follow DNS prepared-query failover across datacenters.

What this means

Prepared queries are Consul’s mechanism for geo-failover service discovery. A query defines a service name plus an optional failover policy. When a consumer resolves the query, Consul first checks for healthy nodes in the local DC. If none exist, it applies the failover policy before returning an empty result.

Three failover mechanisms exist:

  • NearestN: dynamic selection based on network coordinate RTT to the nearest N datacenters.
  • Datacenters: a static, ordered list of DCs to try in sequence.
  • Targets: for a sequential list of WAN-federated datacenters and cluster peers. Mutually exclusive with NearestN and Datacenters; this field was introduced in Consul 1.13.

The masking happens at the DNS layer. When a prepared query resolves via DNS on port 8600, the response contains A, AAAA, or SRV records with no field indicating which DC provided the nodes. An application that resolves my-service.query.consul and gets three IP addresses cannot tell whether those addresses are local or 200 milliseconds away in a remote DC.

The HTTP execute API exposes what DNS hides. The endpoint GET /v1/query/:uuid/execute returns two fields that reveal failover state:

  • Datacenter: the DC that ultimately provided the nodes.
  • Failovers: the count of remote DCs queried during resolution. Zero means results came from the local DC.

Most applications consume Consul via DNS, not the HTTP API. That is the core visibility gap. The failover is working as designed, but operators must actively poll the execute endpoint to know it is happening.

flowchart LR
  A[Consumer DNS query] --> B[Consul agent]
  B --> C{Local DC has
healthy nodes?} C -->|Yes| D[Return local nodes] C -->|No| E[Failover policy:
NearestN or Datacenters] E -->|WAN RPC| F[Remote DC server] F --> G[Remote healthy nodes] G --> H[DNS response:
no source indicator] H --> I[Consumer connects to
remote DC instance]

The “no” branch produces a valid response that looks identical to the “yes” branch from the consumer’s perspective. The only operators who can tell the difference are those polling the HTTP API or correlating DNS latency with health check state.

Common causes

CauseWhat it looks likeFirst thing to check
All local instances failedDNS returns valid IPs, latency slightly elevated, no consumer errorsQuery /v1/health/service/<name>?passing=true locally; zero confirms local outage
ACL replication lag in target DC“ACL not found” or “permission denied” in remote DC server logs during failoverRun curl /v1/acl/replication in the secondary DC, check ReplicatedIndex lag
WAN link degraded or partitionedFailover queries time out or return SERVFAIL instead of remote resultsCheck Serf WAN member count per DC; missing DC means failover target gone
Connect mesh and prepared query mismatchDNS resolves remote IPs but sidecar proxy connections resetDetermine if traffic is plain DNS discovery or Connect mTLS; cross-DC behavior differs

Quick checks

Run these read-only checks to determine whether failover is active and why.

# Execute a prepared query via HTTP and inspect failover state
curl -s http://127.0.0.1:8500/v1/query/<query-uuid>/execute \
  | jq '{Datacenter, Failovers, NodeCount: (.Nodes | length)}'
# Failovers > 0 means results came from a remote DC

# Check local health for the service (are local instances actually dead?)
curl -s "http://127.0.0.1:8500/v1/health/service/<service>?passing=true" | jq length
# Zero means every local instance is unhealthy

# Check ACL replication status in secondary DC (run on a secondary DC server)
curl -s http://127.0.0.1:8500/v1/acl/replication | jq '{Enabled, Running, ReplicatedIndex, ReplicatedTokenIndex, LastSuccess, LastError, LastErrorMessage}'
# LastErrorMessage should be empty; compare ReplicatedTokenIndex with the X-Consul-Index from /v1/acl/tokens; a large gap indicates lag

# Check WAN gossip membership (is the remote DC reachable?)
curl -s "http://127.0.0.1:8500/v1/agent/members?wan=true" \
  | jq '[.[] | .Tags.dc] | group_by(.) | map({dc: .[0], servers: length})'
# Each federated DC should show its expected server count

# Time a DNS lookup for the prepared query name
dig @127.0.0.1 -p 8600 <query-name>.query.consul +stats | grep "Query time"
# Elevated latency suggests cross-DC resolution

# Check whether ACL filtering removed results from the query
curl -sI http://127.0.0.1:8500/v1/query/<query-uuid>/execute \
  | grep -i "X-Consul-Results-Filtered-By-ACLs"
# Header present and true means the query token lacks permissions for some nodes

How to diagnose it

  1. Confirm failover is active. Execute the prepared query via the HTTP API. If Failovers is greater than zero, the query is forwarding to a remote DC. If Datacenter does not match the local DC name, results are coming from elsewhere.

  2. Check whether local instances are genuinely unhealthy. Query /v1/health/service/<service>?passing=true for the service in the local DC. Zero results means every instance is failing health checks. The failover is masking a real local outage.

  3. If local instances are healthy but failover is still active, check ACL filtering. The X-Consul-Results-Filtered-By-ACLs response header on the execute endpoint indicates whether the query’s token is filtering out nodes that should be visible. A misconfigured token can remove all local results, triggering failover to a remote DC unnecessarily.

  4. If the failover target DC is returning errors, check ACL replication. When the query forwards to a remote DC, the query’s ACL token must be valid there. Run curl /v1/acl/replication on a server in the target DC. If ReplicatedTokenIndex lags behind the token index exposed by the target DC, LastErrorMessage is non-empty, or LastError is later than LastSuccess, the token or its policies may not be replicated yet. The server will reject the request with “ACL not found” or “permission denied.”

  5. Verify WAN connectivity between DCs. Check Serf WAN membership. If the target DC is missing from the WAN pool entirely, the failover RPC has no destination. The query will fail rather than silently forward.

  6. If using Connect service mesh, verify the traffic path. DNS prepared-query failover resolves remote IPs, but Consul does not support prepared queries for service-mesh failover; a standard prepared query does not give the sidecar proxy the mesh routing/identity configuration needed for the remote instance. Issue #8011 records this failure with ECONNRESET and remains open at review time.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
Prepared query Failovers count (HTTP execute API)Non-zero means results came from a remote DC, masking local emptinessAny sustained non-zero value for a query expected to be locally served
Datacenter field on query executionIdentifies which DC is actually serving resultsField does not match local DC name
DNS query latency for prepared query namesCross-DC lookups incur WAN RTT on every resolutionSustained latency increase for a specific .query.consul name
consul_health_service_status critical count (local DC)Local instances dying is what triggers failover in the first placeSpike in critical checks for the affected service
consul_acl_replication lag (secondary DCs)Stale tokens cause authorization failures when queries forward remotelyLag greater than 5 seconds, or LastError non-empty
Serf WAN member count per DCMissing DC means failover has no targetAny federated DC showing fewer servers than expected
consul_rpc_request error rate with “ACL not found”Replication lag surfacing as authorization failures in the target DCErrors appearing only in secondary DC, not primary

Fixes

Local instances are genuinely all dead

The failover is working correctly. The problem is the local service, not Consul. Focus on recovering the local instances. Do not disable failover to “fix” the visibility problem. Removing failover means consumers get empty DNS responses and fail immediately instead of degrading to the remote DC.

The operational fix is detection: add monitoring that polls the execute API and alerts when Failovers exceeds zero for a query that should be locally served. That alert is your signal that local health has collapsed.

ACL replication lag causing authorization failures in target DC

When failover forwards a query to a remote DC, the query’s ACL token is evaluated in that DC. If replication has not yet delivered the token or its policies, the remote server returns “ACL not found” or “permission denied.” This is the composite failure pattern known as ACL replication staleness during failover.

Steps to resolve:

  1. Check /v1/acl/replication on the target DC server. Confirm Enabled is true and inspect LastError.
  2. Verify WAN connectivity between the primary and secondary DC. ACL replication traverses the same WAN links as gossip.
  3. Check the replication token. If it has expired or its permissions changed, replication stalls silently. Rotate the token if needed.
  4. Check primary DC ACL subsystem load. A burst of token creation in the primary can overwhelm replication before the secondary catches up.
  5. If replication is broken and authorization is completely failing, consider the acl_down_policy setting as an emergency measure. Understand the security tradeoff before changing it.

WAN connectivity degradation

If the failover target DC is unreachable, the query fails entirely instead of silently forwarding. Consumers see DNS SERVFAIL or timeouts. This is arguably better than silent masking because the failure is visible, but the safety net is gone.

Check Serf WAN membership. If the remote DC servers are missing from the WAN pool, the cross-DC RPC has no destination. Common causes include WAN gossip port (8302) blocked by a firewall change, WAN gossip encryption key mismatch between DCs, or the remote DC being completely down.

Connect mesh does not follow prepared-query failover

If your service uses Consul Connect (mTLS sidecar proxies), prepared-query DNS failover resolves remote IPs, but the sidecar proxy lacks the service-resolver/routing configuration required for mesh failover. The DNS lookup succeeds, the application attempts to connect, and the connection can reset. This looks like a network error but is a capability boundary between DNS-based discovery and mesh-based routing.

For Connect-enabled services that need cross-DC failover, use service-resolver config entries with Failover instead of prepared queries. Service-resolver failover is designed for the mesh and handles identity and routing correctly across DC boundaries.

Prevention

Monitor the execute API, not just DNS. The DNS interface cannot tell you whether results are local or remote. Polling /v1/query/:uuid/execute and alerting on Failovers > 0 is the only reliable way to detect silent failover for queries expected to serve locally.

Track ACL replication lag in every secondary DC independently. “Works in primary” is not sufficient. Secondary DC ACL monitoring is one of the most common gaps in multi-DC deployments. Replication lag greater than 5 seconds, or any LastError, warrants investigation before it causes authorization failures during failover.

Test cross-DC lookup latency proactively. Do not wait for a failover event to discover that WAN RTT adds 200 milliseconds to every DNS resolution. Regular probing of cross-DC prepared query names reveals WAN degradation before it becomes an outage.

Document which prepared queries have failover enabled and what their target DCs are. During an incident, operators need to know immediately whether a given query can forward, where it forwards to, and what the ACL implications are. Undocumented failover policies are a common source of confusion during cross-DC events.

Know which services use Connect mesh versus plain DNS discovery. Prepared-query failover only helps services that consume DNS directly. Connect-enabled services need service-resolver failover, not prepared queries. Mixing the two without understanding the difference creates a class of bugs where DNS resolves but connections fail.

Separate WAN gossip encryption key management from LAN. WAN and LAN gossip use independent encryption keys. A key rotation that updates one but not the other silently breaks cross-DC communication. This is a common cause of silent WAN federation failure.

How Netdata helps

  • Per-second DNS query latency surfaces the latency jump the moment lookups start crossing DC boundaries, before consumers notice degraded response times.
  • Health check critical state ratio shows local instances failing in real time, directly correlatable with the moment Failovers transitions from zero to non-zero.
  • ACL replication lag metrics expose stale tokens in secondary DCs before authorization failures reach applications during failover.
  • Serf WAN member count per DC provides immediate visibility into cross-DC connectivity, showing whether failover targets are even reachable.
  • Correlating DNS latency spikes with health check failures and WAN membership changes pinpoints whether the root cause is a local service outage, WAN degradation, or ACL replication lag, rather than guessing from a single signal.
  • Tracking RPC request error rates with “ACL not found” patterns in secondary DCs catches replication-driven authorization failures before they cascade.