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-stream-replica-lag ▌

Operations Guides

NATS JetStream replica lag: a non-current replica that would lose data on failover

A replicated JetStream stream shows current: false with a non-zero lag for one of its replicas in nats stream info. Everything still works: publishes succeed, consumers receive messages, no alerts fire on server health. But the replication factor you configured is not the replication factor you have. If the leader fails right now, a failover to the lagging replica loses every message the leader acknowledged but the replica has not yet written.

This is a dangerous state because it is silent. The stream leader keeps serving traffic, so there is no user-facing symptom. The only place the risk shows up is the per-replica state in stream info and the per-stream Raft group state. This guide covers how to read those fields, decide whether you have a transient catch-up or a real problem, find the cause, and fix it without making things worse.

What this means

Each JetStream stream with replicas > 1 has its own Raft group. The leader appends entries, replicates them to followers, and acknowledges a publish once a quorum of replicas has the entry. The per-replica fields in stream info describe the follower side of that contract:

  • current (bool): whether the replica is fully caught up with the leader.
  • lag (int): how many messages behind the leader this replica is.
  • active (duration): time since the leader last heard from this replica.
  • offline (bool): whether the replica is unreachable entirely.

The combinations that matter:

StateMeaningRisk
current: true, lag: 0Fully replicatedNone
current: false, lag > 0Behind; new messages not yet replicatedFailover to this replica loses the lagging messages
offline: trueUnreachableNo replication happening at all; quorum redundancy reduced
lag: 1-2 that never clearsPerpetual small lagA failover would always lose the most recent messages

Two severity rules from the field:

  • A single non-current replica is a ticket-level problem. Investigate it, but quorum still protects you.
  • More than one non-current replica, or an offline replica in a cluster with no remaining quorum redundancy, is page-level. You are one leader failure away from data loss or an unwritable stream.

Thresholds that separate normal from abnormal: lag > 0 sustained for more than 30 seconds is abnormal, active greater than about 5 seconds means the replica has not been heard from recently, and offline: true for more than a minute is a real problem, not a network hiccup. Transient lag during a publish burst is expected; lag that persists is not.

flowchart TD
  A[nats stream info: replica current=false, lag>0] --> B{Offline?}
  B -->|yes, over 1 min| C[Replica down or partitioned: check process, routes, network]
  B -->|no| D{Lag clearing over 30s?}
  D -->|yes| E[Transient catch-up: watch until current=true]
  D -->|no| F[Check replica disk I/O and route backpressure]
  F --> G{iostat await high on replica?}
  G -->|yes| H[Disk bottleneck on replica]
  G -->|no| I{routez pending_size growing?}
  I -->|yes| J[Congested route between servers]
  I -->|no| K[Perpetual 1-2 msg lag: subtle timing or I/O issue, treat as real]

Common causes

CauseWhat it looks likeFirst thing to check
Replica server down or unreachableoffline: true, active climbingIs the nats-server process up on that node; are routes connected
Disk I/O bottleneck on the replicalag grows or never clears, high iowait on that nodeiostat await and utilization on the JetStream storage path
Congested route between serversRoute pending_size non-zero and growing, elevated route RTT/routez for the route toward the lagging peer
Raft log compaction issuesLag persists with no obvious resource pressureServer logs on the replica for Raft errors; /raftz group state
Catch-up after restart or recoverycurrent: false with large lag right after a node rejoinsWhether lag is trending down; give it time before intervening

The last row is the one people overreact to. A replica that just restarted or rejoined the cluster will be behind by definition. The question is whether it is converging. If lag decreases steadily, leave it alone. If it stays flat or grows, you have one of the first four problems.

Quick checks

All of these are read-only.

# Per-replica state for the stream (run on any server in the cluster)
nats stream info ORDERS --json | jq '.cluster | {leader, replicas: [.replicas[] | {name, current, lag, active, offline}]}'

# Watch the trend: is lag converging or stuck?
watch -n 5 'nats stream info ORDERS --json | jq ".cluster.replicas[] | {name, current, lag, active, offline}"'

# Meta cluster health: is the JetStream metadata Raft group stable?
curl -s http://localhost:8222/jsz | jq '.meta_cluster | {leader, replicas: [.replicas[]? | {name, current, offline, lag}]}'
# /jsz meta state lives under cluster.{name,leader,replicas}; per-Raft-group detail appears
# under the meta/streams accounts sections depending on the accounts argument

# Per-Raft-group detail, including per-stream groups
curl -s http://localhost:8222/raftz | jq '.'

# Route health and per-route backpressure
curl -s http://localhost:8222/routez | jq '.routes[] | {rid, ip, rtt, pending_size}'

# Route count: in an N-node cluster each server should have N-1 routes
curl -s http://localhost:8222/varz | jq '.routes'

# Disk latency on the lagging replica's node (JetStream storage device)
iostat -x 5 3

# Kernel-level storage errors on the replica
dmesg | grep -iE 'i/o error|ext4|xfs' | tail -20

# JetStream API pressure: high inflight correlates with Raft or disk slowness
curl -s http://localhost:8222/jsz | jq '{api_total: .api.total, api_errors: .api.errors, inflight: .api.inflight}'

Two notes on interpretation. First, lag is measured in messages, not bytes. A lag of 500 on a stream of 200-byte telemetry messages is very different from a lag of 500 on a stream of 1 MB payloads. Size the risk before you prioritize. Second, nats stream info is a point-in-time snapshot. A single sample is not a diagnosis; the trend over 30-60 seconds is.

How to diagnose it

  1. Confirm the state and the scope. Run nats stream info <stream> --json and record current, lag, active, and offline for every replica. Then check your other replicated streams. If one replica on one stream is behind, the problem is likely stream- or node-specific. If many streams show the same replica lagging, the problem is that server: its disk, its network path, or the server itself.

  2. Classify: offline, stuck, or converging. offline: true for over a minute points at a down or partitioned server. current: false with lag trending down is normal catch-up. current: false with lag flat or growing is a live replication problem. The watch command above answers this in under a minute.

  3. Check the replica’s server. Is the process up? Check uptime on that node (curl -s http://<replica>:8222/varz | jq .uptime). An unexpected uptime reset near the time lag started means the server restarted and is catching up. If it never catches up, keep going.

  4. Check route connectivity and backpressure. From the leader’s node, look at /routez. The route toward the lagging peer should exist, and its pending_size should be at or near zero. Sustained non-zero pending_size on a route means inter-server traffic is backing up, which starves Raft replication just as it starves message routing. Elevated route rtt relative to baseline points the same direction. A route slow consumer event (check /varz slow_consumer_stats.routes) is the loud version of this problem.

  5. Check disk I/O on the replica. Run iostat -x 5 3 on the lagging node and look at await and %util for the device holding the JetStream store. Raft log appends and stream writes are latency-sensitive; a replica that cannot fsync fast enough cannot keep up with the leader. High iowait with plenty of free space is the disk stall pattern, distinct from storage exhaustion. Also check for backup or snapshot processes running against the store, a classic cause of transient replication lag.

  6. Check for the silent-catastrophe case. If the replica shows a perpetual lag of 1-2 messages that never clears, do not dismiss it because the number is small. This pattern means the replica is structurally just behind the leader at all times, and any failover to it will always lose the most recent writes. It usually traces to a subtle I/O or timing issue: slightly slow fsync, a congested route that adds just enough delay, or compaction timing. Treat it as a real fault, not noise.

  7. Decide severity before acting. One non-current replica out of three: ticket, work through causes. Two non-current or any offline replica without remaining quorum redundancy: page, because the next leader failure either loses data or makes the stream unwritable.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
Per-replica current and lag (stream info, /raftz)Direct measure of replication safety per streamcurrent: false or lag > 0 sustained over 30s
Per-replica activeTime since last contact; detects a replica going dark before it is marked offlineOver about 5s
Per-replica offlineReplica not participating at alltrue for over 1 min
Meta cluster leader stability (/jsz)Frequent meta leader changes signal Raft instability that will show up as stream lag nextMore than 1 change per 5 min
Route pending_size and rtt (/routez)Route backpressure starves replication trafficSustained non-zero pending; RTT rising from baseline
slow_consumer_stats.routes (/varz)A route slow consumer means inter-server communication is failingAny positive rate of change
Disk await and iowait on replica nodesThe most common root cause of a replica that cannot keep upSustained high await on the store device
api.inflight and api.errors (/jsz)High inflight plus rising errors correlates with Raft or disk slownessInflight persistently above baseline

One caveat: a replica that reports current: true tells you it is caught up on sequence, not that its on-disk state has been verified message-for-message against the leader. There are community reports of replicas reporting current while holding divergent data after recovery. For streams where this matters, periodic snapshot-and-compare or restore testing is the honest check.

Fixes

Replica server down or unreachable

Bring the node back and let it catch up. Verify the process, then routes: in an N-node cluster each server should have N-1 routes, and a missing route toward the replica means a partition, not a slow disk. Check firewalls, security groups, and DNS if routes will not establish. Once the node is back and routes are up, watch lag trend to zero. Do not assume catch-up succeeded; confirm current: true.

If the node is permanently dead, it still counts toward the stream’s configured replication factor. Replacing it means removing the dead peer from the stream’s Raft group and letting the cluster place a new replica. The nats stream cluster family of commands includes peer removal and leader step-down operations; peer removal is disruptive to the target node’s JetStream assets, so read the current JetStream clustering administration docs for your server version before running it.

Disk I/O bottleneck on the replica

This is the most common root cause and the one with the clearest fix: JetStream storage belongs on local SSDs. Network-attached storage with variable latency is the leading cause of Raft instability generally, and of replica lag specifically, because the Raft log append path is latency-sensitive.

Short term: find what is competing for the disk. Filesystem backups and snapshots against the store cause exactly this symptom, and the fix is scheduling, not hardware. Reduce the number of streams sharing the device or the publish rate if the device is simply undersized.

Long term: move the store to faster local storage. Also check whether the lagging node is carrying an unfair share of stream leaders plus replicas; an overloaded node lags on its follower duties too.

Congested route

If /routez shows growing pending_size or elevated RTT toward the replica, replication traffic is queueing behind route traffic. Check overall byte throughput (in_bytes, out_bytes rates against NIC capacity) and look for what changed: a traffic burst, a new high-fan-out subject, or cross-server replication multiplying network load (replication costs roughly R times the message size in network traffic). Relieve the congestion first; the Raft lag will clear on its own once the route drains. If routes are flapping, treat that as its own incident before chasing the lag.

Perpetual 1-2 message lag

Do not ignore this one. Work through the disk and route checks above on that specific replica, because the cause is real even if the number is small. If nothing shows, look at Raft log compaction and server logs on the replica for warnings around applying entries. A replica that never quite catches up is a failover that will always lose your newest messages.

Prevention

  • Alert on the replica state, not just server health. Server up does not mean replication is working. Alert when any replica of an R>1 stream shows current: false or lag > 0 for more than 30 seconds, active over about 5 seconds, or offline: true for more than a minute.
  • Alert on the silent-catastrophe pattern separately. A replica with lag pinned at 1-2 messages for hours will not trip a “lag is high” threshold. Track time-since-last-fully-current per replica, not just lag magnitude.
  • Local SSDs for JetStream stores. This single decision removes the largest class of replication lag causes.
  • Monitor route backpressure as a leading indicator. Route pending_size and route slow consumer events fire before stream replicas fall visibly behind. Watch the precursor.
  • Watch leader and replica distribution. A node that is leader for most streams plus follower for the rest will lag first under load.
  • Size network for replication. Replication multiplies stream traffic by the replica count on the wire between servers. Keep total throughput under about 70 percent of link capacity so bursts do not starve Raft.
  • Test failover, do not assume it. Periodically verify that a step-down on a non-current stream behaves the way you expect, and that your runbook distinguishes “replica exists” from “replica is safe to promote.”

How Netdata helps

  • Netdata polls the NATS HTTP monitoring endpoints (/varz, /jsz, /routez) so you can correlate server-level signals with replication state on one timeline: route RTT and pending, API inflight and errors, memory, and uptime resets.
  • Uptime tracking makes the “replica restarted and is catching up” case obvious instead of something you reconstruct from logs.
  • Per-node disk I/O and iowait charts from the Netdata agent on each NATS host let you see which replica’s storage is too slow without SSHing into three boxes during an incident.
  • Route health and slow consumer counters expose inter-server backpressure, the leading indicator that a replica is about to fall behind.
  • Alerting on sustained conditions (lag persisting, routes degraded, disk latency elevated) catches the quiet drift cases, including the perpetual small-lag pattern that threshold-on-magnitude alerts miss.