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 / nats / nats-mirror-source-lag ▌

Operations Guides

NATS JetStream mirror and source lag: stale replicas and DR recovery point

A JetStream stream configured as a mirror of another stream, or sourcing from one or more upstream streams, keeps a local copy that is only as fresh as its sync connection. Stream info reports two fields per mirror or source: lag, the number of messages the local copy is behind, and active, the time since the last sync activity. When those numbers move the wrong way, the copy is going stale.

For a disaster recovery mirror this is not a performance nicety. The lag is your recovery point objective in real time. If the source cluster fails right now and you fail over to the mirror, every message counted in lag is data you do not have. A mirror that reports lag: 0 but has not synced in 20 minutes is arguably worse: it looks caught up while silently falling behind every second the source keeps accepting writes.

What this means

Mirror and source streams replicate asynchronously. The local stream pulls messages from the origin over whatever connectivity links the two: a gateway for cross-cluster mirrors, a route or direct connection for same-cluster setups. Asynchronous means the copy is always slightly behind by design, and the system tolerates the origin being unreachable for extended periods. Brief lag during bursts is normal. What you are hunting for is the pattern that does not recover.

Two failure shapes matter:

Steady or growing lag with recent activity. The sync connection is alive but cannot keep up. The source is publishing faster than the mirror can pull, or the path between them does not have the bandwidth. This degrades your RPO linearly with time.

Lag frozen or growing with stale active. The sync connection itself is broken. Nothing has flowed for longer than the reconnect cycle, which means a gateway drop, an auth or permission change, or an overloaded source that stopped serving the sync consumer. This is the dangerous one for DR: your effective RPO is now “time since active last moved plus current lag,” and it grows until someone notices.

Working thresholds:

  • lag > 0 sustained for more than 1 minute: warning. Investigate before it compounds.
  • active greater than 30 seconds: the sync connection may be broken. Treat as a probable fault, not a blip.

Mirror and source lag are distinct from Raft replica lag (cluster.replicas[].lag), which measures replication between peers of the same stream inside one cluster. Mirror/source lag measures a copy of a stream that lives somewhere else. Both can be non-zero at once, and the fixes are different. For how JetStream replication and Raft fit together, see How NATS actually works in production.

Common causes

CauseWhat it looks likeFirst thing to check
Gateway disconnection (cross-cluster mirror)active climbing past 30s, lag frozen then growing/gatewayz on both sides: expected outbound/inbound gateway present?
Overloaded source stream or serverLag grows steadily, active recent but sync rate below publish rateSource server CPU, disk I/O, JetStream API inflight via /jsz
Insufficient bandwidth on the sync pathLag tracks publish rate minus a ceiling; worse during burstsNetwork throughput between clusters vs stream byte rate
Auth or permission change breaking the mirroractive jumps to stale right after a config or credential changeServer logs for authorization violations on the sync subjects
Cross-account or leaf node setup missing flow control exportsMirror stalls after an initial burst of messages, active goes staleAccount export/import config for flow control subjects
Source stream content changing too fast (rapid publish-then-delete)Inconsistent or laggy replication despite healthy connectivityWhether producers delete or purge messages shortly after publishing

Quick checks

All of these are read-only.

# Mirror lag and last sync activity for a mirror stream
nats stream info MIRROR_STREAM --json | jq '.mirror | {name, lag, active}'

# Per-source lag and activity for a sourcing stream
nats stream info SOURCED_STREAM --json | jq '.sources[] | {name, lag, active}'

# Replication report across streams 
nats stream report
# Gateway connectivity on the cluster hosting the mirror
curl -s http://localhost:8222/gatewayz | jq '{outbound: (.outbound_gateways | keys), inbound: (.inbound_gateways | keys)}'
# Is the source server itself healthy and not saturated?
curl -s http://localhost:8222/varz | jq '{cpu, mem, connections, slow_consumers}'
curl -s http://localhost:8222/jsz | jq '{api_total: .api.total, api_errors: .api.errors, inflight: .api.inflight}'
# Publish rate on the origin stream: is it outpacing the sync?
nats stream info ORIGIN_STREAM --json | jq '.state | {messages, bytes, first_seq, last_seq}'

Take the lag reading twice, a minute apart. Lag that decreases between samples is a sync that is catching up. Lag that increases is a sync losing ground. Lag that never changes while active grows is a dead connection.

How to diagnose it

flowchart TD
  A[Mirror or source lag detected] --> B{active recent, under 30s?}
  B -- Yes --> C{Lag shrinking between samples?}
  B -- No --> D[Sync connection broken]
  C -- Yes --> E[Transient burst, keep watching]
  C -- No --> F[Throughput problem]
  D --> G[Check gatewayz for missing gateway]
  D --> H[Check logs for auth or permission violations]
  D --> I[Check cross-account or leaf flow control setup]
  F --> J[Compare source publish rate to link bandwidth]
  F --> K[Check source server CPU, disk, api inflight]
  1. Read lag and active for the stream. Use nats stream info with jq as above. Note both numbers and the current time.

  2. Decide which failure shape you have. If active is over 30 seconds, go to step 3: the sync connection is suspect. If active is fresh but lag grows, go to step 5: it is a throughput problem.

  3. Check the connectivity layer. For cross-cluster mirrors, verify the expected gateway exists in /gatewayz on both clusters. A missing outbound gateway means the remote cluster is unreachable and the mirror cannot sync at all. For leaf node or cross-account topologies, verify the leaf connection in /leafz.

  4. Check for auth and permission breakage. If the mirror went stale right after a credential rotation or config change, grep the server logs on the origin side for authorization violations. A mirror is a consumer of the origin stream; anything that revokes its read access kills the sync silently from the mirror’s point of view. Also verify account exports and imports are intact if the mirror crosses accounts.

  5. Measure the throughput gap. Compare the origin stream’s publish rate against the observed sync rate and against the bandwidth of the link between the clusters. If the publish rate exceeds what the path can carry, lag grows no matter how healthy everything is. Bursts that outrun the link are fine as long as lag drains afterward; a permanent deficit is not.

  6. Check the source server’s headroom. High CPU, disk I/O saturation, or elevated JetStream api.inflight on the origin means it is slow to serve the internal sync consumer. The fix belongs on the source, not the mirror.

  7. Confirm recovery. After remediation, lag should fall to zero and active should stay in the low seconds. If active cycles between fresh and stale, the connection is flapping: look at gateway RTT and slow consumer events on the gateway or route connections.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
Mirror/source lagThis is your DR recovery point in messages> 0 sustained over 1 minute, or growing between samples
Mirror/source activeTime since last sync activity; detects dead sync connections> 30 seconds
Gateway presence (/gatewayz)Cross-cluster mirrors die when the gateway dropsExpected gateway missing for > 60s
Gateway or route slow consumers (slow_consumer_stats)A slow gateway backs up all cross-cluster traffic including mirror syncNon-zero gateway slow consumer events
Source server api.inflight and CPUAn overloaded source serves sync consumers slowlySustained elevation above baseline
Link throughput vs origin publish byte rateTells you if lag is a bandwidth deficitPublish rate persistently above achievable sync rate

If you run the Prometheus exporter, it exposes per-source lag and inactivity gauges (jetstream_stream_source_lag and jetstream_stream_source_active_duration_ns), which are the right basis for alerting.

Two replication semantics worth knowing before you rely on a mirror for DR:

  • Deletes in the origin stream are not replicated through a mirror or source agreement. Retention-driven expiry and explicit deletes on the origin do not propagate the same way, so message counts can legitimately differ.
  • Quickly deleting messages after publishing on the origin can produce inconsistent replication, because replication is asynchronous and may not have copied the message before it disappeared. If your producers purge aggressively, a mirror is not a reliable copy.

Fixes

Gateway or connectivity restored. Re-establish the gateway or leaf connection. The mirror recovers on its own once the path is back; expect the sync to take some seconds to re-establish, then lag should drain. If it does not, restart the diagnosis at the auth step. Do not restart servers as a first move: a broken gateway on one side does not need a cluster restart to fix.

Auth or permission change. Restore the read access the mirror’s internal consumer needs on the origin subjects, or roll back the offending credential change. This class of failure is silent on the mirror side, so add it to your change checklist for any permission edit touching JetStream accounts.

Bandwidth deficit. If the origin publish rate exceeds what the inter-cluster link can sustain, no tuning fixes this. Either reduce what the mirror must carry (filter subjects on the source configuration so it only syncs what DR actually needs), provision more bandwidth, or accept a larger RPO explicitly and monitor against it.

Overloaded source. Relieve the origin server: move stream leaders, add capacity, or reduce ingest. Mirror lag here is a symptom of source distress, so fix the source and the mirror follows.

Broken mirror that cannot resync cleanly. As a last resort, recreating the mirror stream forces a full re-sync from the origin’s current state. This is disruptive: the mirror is unavailable or incomplete during the rebuild, and any failover plan depending on it is degraded until lag returns to zero. Treat it like restoring a backup, not like a service restart.

Prevention

  • Alert on lag and active, not just on gateway state. Gateways can be up while the mirror is stale for auth reasons. The mirror’s own fields are the only ground truth for freshness.
  • Define your RPO as a lag budget. If your DR plan promises 60 seconds of data loss, alert when lag exceeds 60 seconds worth of messages at the current publish rate, and page when active exceeds 30 seconds.
  • Test failover against the mirror periodically. A mirror you have never failed over to is a hypothesis, not a DR plan. Verify the copy is usable and that you know the lag at the moment of failover.
  • Include mirror permissions in credential change review. Any change to accounts, exports, imports, or JetStream permissions on the origin side should be checked against what mirrors and sources consume.
  • Size the inter-cluster link for peak publish rate, not average. Async replication absorbs bursts only if there is headroom to catch up afterward.

How Netdata helps

  • Netdata’s NATS collector polls the HTTP monitoring endpoints, so gateway presence, route health, slow consumer breakdowns, and JetStream API errors sit on the same dashboard as the server-level signals that explain mirror lag.
  • Correlating slow_consumer_stats for gateways with the time a mirror went stale distinguishes a bandwidth or backpressure problem from an auth problem without log diving.
  • JetStream api.inflight and api.errors trends on the origin server show whether a lagging mirror is a symptom of source overload.
  • Connection and throughput charts on both clusters let you compare publish rate against link capacity, the deciding evidence for a bandwidth deficit.
  • Netdata does not currently collect per-stream mirror/source lag fields directly. Pair it with the nats stream info checks above or the Prometheus exporter gauges for the lag itself, and use Netdata for the surrounding cause.