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-consumer-lag-growing ▌

Operations Guides

NATS JetStream consumer lag growing: falling behind the stream

The NATS server is healthy. /healthz returns ok, throughput looks normal, CPU and memory are fine. But one stream keeps growing, and the consumer attached to it is not keeping up. num_pending climbs minute after minute, and every dashboard that only watches server-level metrics shows green.

Consumer lag requires per-consumer polling, not a single server endpoint, so most monitoring setups never see it. The result: a stream with millions of pending messages, effectively down while the server looks healthy.

This article covers how to measure lag correctly, the states that produce growing lag, and the fix for each.

What this means

A JetStream consumer tracks two cursors against the stream’s sequence numbers: what it has delivered and what has been acknowledged. Lag is the distance between where the stream is and where the consumer is.

For an unfiltered consumer:

lag = stream last_seq - consumer delivered.stream_seq

For a filtered consumer (one with a FilterSubject), raw sequence difference overstates lag because the consumer only cares about a subset of messages. Use the consumer’s own num_pending field, which counts only messages matching the filter.

Raw message counts are the wrong unit for alerting. 50,000 pending messages is nothing at 100,000 msg/s and catastrophic at 10 msg/s. Express lag as time behind:

seconds_behind = lag_messages / message_rate_per_second

More than about 5 minutes behind on a latency-sensitive workload is typically concerning. Batch and replay consumers are the exception: they are expected to carry high pending counts, so do not alert on them the same way.

Three per-consumer fields tell you which kind of trouble you are in:

  • num_pending: messages available for delivery but not yet delivered. Growing means the consumer is falling behind producers.
  • num_ack_pending: messages delivered but not yet acknowledged. Growing means the consumer received messages but is not acking, either because processing stalled or AckWait is too short.
  • num_redelivered: messages redelivered after ack timeout. Growing means a NAK/redelivery loop or a consumer crashing mid-processing.

Common causes

CauseWhat it looks likeFirst thing to check
Consumer too slownum_pending grows steadily, num_ack_pending stays moderate, processing keeps up partiallyConsumer application CPU, downstream latency, publish rate vs ack rate
Disconnected but registered consumernum_pending grows, num_ack_pending flat or zero, no deliveries happeningWhether the consumer application is actually running and connected
Stalled at MaxAckPendingnum_ack_pending pinned at the consumer’s MaxAckPending limit, delivery stopped, stream grows silentlyCompare num_ack_pending to configured MaxAckPending
NAK/redelivery loopnum_redelivered climbing, same messages cycling, lag never drainsConsumer error logs, whether processing fails partway and NAKs
AckWait too shortMessages redelivered while still being processed, duplicates, num_redelivered growingAckWait vs actual p99 processing time

The MaxAckPending stall deserves emphasis. When num_ack_pending reaches the configured limit (default 1000 for consumers with explicit acks), the server stops delivering new messages until some pending messages are acked. No error is raised anywhere. The consumer looks fine, the server looks fine, and the stream grows silently. A pull consumer showing num_ack_pending == MaxAckPending with num_waiting == 0 is full and not requesting more: delivery is stalled.

Quick checks

All of these are read-only.

# Per-consumer state across the whole server (costlier on servers with many consumers)
curl -s 'http://localhost:8222/jsz?consumers=true' | \
  jq '.account_details[].stream_detail[].consumer_detail[] | {name, num_pending, num_ack_pending, num_redelivered}'

# One consumer in detail
nats consumer info STREAM_NAME CONSUMER_NAME --json | \
  jq '{pending: .num_ack_pending, waiting: .num_waiting, redelivered: .num_redelivered, ack_floor: .ack_floor.consumer_seq}'

# Compute delivery lag for an unfiltered consumer
STREAM="mystream"; CONSUMER="myconsumer"
LAST=$(nats stream info $STREAM --json | jq '.state.last_seq')
DELIVERED=$(nats consumer info $STREAM $CONSUMER --json | jq '.delivered.stream_seq')
echo "Lag: $(( LAST - DELIVERED )) messages"

# Stream growth: is first_seq advancing or is the stream just accumulating?
curl -s "http://localhost:8222/jsz?streams=true" | \
  jq '.account_details[].stream_detail[] | {name: .name, messages: .state.messages, bytes: .state.bytes, first_seq: .state.first_seq, last_seq: .state.last_seq}'

# Is the server itself under stress? (rules out server-side causes)
curl -s http://localhost:8222/jsz | jq '{api_total: .api.total, api_errors: .api.errors, inflight: .api.inflight}'

/jsz?consumers=true returns substantially more data than the bare endpoint and is costlier on servers with many consumers. For routine monitoring, poll it at a modest interval; for incident triage, query the one consumer you care about via the CLI.

How to diagnose it

Work through these in order. Each step eliminates one of the lag states.

  1. Confirm lag is real and growing. Sample num_pending (filtered) or last_seq - delivered.stream_seq (unfiltered) two or three times, 30 seconds apart. A single snapshot proves nothing; bursty workloads spike and drain. Growing across samples is the signal.

  2. Convert to time behind. Divide lag by the current publish rate. If the answer is seconds and stable, this is a queue absorbing a burst, not a consumer failing. If the answer is minutes and growing, continue.

  3. Check num_ack_pending against MaxAckPending. If it is pinned at the limit, delivery has stalled at the flow-control ceiling. The question becomes why nothing is being acked: processing hung, AckWait expiring before processing finishes, or the consumer application dead but the durable consumer still registered.

  4. Check num_redelivered. A climbing redelivery counter means messages are coming back. Either processing exceeds AckWait (messages redelivered mid-processing, producing duplicates) or the handler is failing and NAKing in a loop.

  5. Verify the consumer application is alive and connected. A disconnected-but-registered durable consumer accumulates num_pending indefinitely. No server-side error fires for this.

  6. Rule out server-side causes. Check api.inflight and api.errors on /jsz. Persistently high inflight plus rising errors points at Raft or disk I/O trouble slowing the whole JetStream subsystem, which shows up as lag across many consumers at once, not just one. If only one consumer on one stream is behind, the problem is almost always application-side.

flowchart TD
  A[num_pending growing] --> B{num_ack_pending at MaxAckPending?}
  B -->|Yes| C[Delivery stalled: check acking, processing hung or AckWait too short]
  B -->|No| D{num_redelivered climbing?}
  D -->|Yes| E[NAK or redelivery loop: handler failing or AckWait shorter than processing]
  D -->|No| F{Consumer app connected?}
  F -->|No| G[Disconnected durable consumer accumulating backlog]
  F -->|Yes| H[Consumer too slow: publish rate exceeds processing capacity]

Metrics and signals to monitor

SignalWhy it mattersWarning sign
num_pending per consumerThe direct measure of how far behind the consumer isSustained growth rate above zero
Time behind (lag / publish rate)The alertable unit; message counts are meaningless without rateMore than ~5 minutes on latency-sensitive streams
num_ack_pending vs MaxAckPendingPredicts the delivery stall cliff before it fully bitesRatio above 80%; equality means delivery stopped
num_redelivered rateDetects NAK loops and AckWait misconfigurationAny sustained positive rate
Stream messages and first_seq movementShows whether retention is draining or the stream is accumulatingmessages growing while first_seq is static
api.inflight + api.errorsDistinguishes one slow consumer from a sick JetStream subsystemHigh inflight plus rising errors across all consumers

On alert severity: consumer lag is a ticket, not a page. It is an application-level concern, ephemeral consumers legitimately lag during scaling events, and batch/replay consumers carry high pending by design. Gate alerts on known-durable, latency-sensitive consumers, and alert on sustained growth rate rather than absolute count.

Fixes

Consumer too slow

Scale the consumer horizontally. With a queue group (a consumer with a DeliverGroup), adding members distributes deliveries across them; note that MaxAckPending is shared across all members of the group. If scaling is not possible, find the processing bottleneck: synchronous database writes in the handler, GC pauses, and serialization hot spots are the usual suspects. Compare publish rate to ack rate to size the gap honestly.

Stalled at MaxAckPending

Two knobs, with tradeoffs:

  • Raise MaxAckPending. Lets more messages be in flight before delivery pauses. Tradeoff: a crashed consumer now holds more unacked messages, and recovery after failure redelivers a larger batch.
  • Fix the acking. If the consumer is not acking because processing is hung or AckWait expires first, raising the limit only delays the next stall. Treat the limit as the symptom, not the cause.

NAK/redelivery loop and AckWait too short

If num_redelivered climbs while processing is otherwise healthy, AckWait is shorter than real processing time, so messages are redelivered mid-processing and handled twice. Set AckWait comfortably above your p99 processing latency. If the handler itself is failing (poison message, downstream outage), fix the handler; no server-side tuning will drain a loop.

Disconnected but registered consumer

Restart or redeploy the consumer application. If the consumer is genuinely dead and not coming back, deleting the consumer lets retention proceed. Warning: with interest retention, deleting a consumer immediately makes all its pending messages eligible for deletion. Confirm that data loss is acceptable before running nats consumer rm. On restart, a durable consumer resumes from its last ack, so a consumer that was down for a while will show large initial lag while it drains. That is expected; watch that the drain rate exceeds the publish rate.

Server-side contributors

If many consumers across streams lag simultaneously and api.inflight is persistently high, suspect Raft instability or disk I/O stalls rather than individual consumers. See the related guides below for those paths.

Prevention

  • Alert on time behind, not message counts. Compute lag per durable consumer, divide by publish rate, alert on sustained minutes-behind. Absolute thresholds break across deployment sizes.
  • Track the num_ack_pending / MaxAckPending ratio. A consumer regularly running above 80% is one slow processing cycle away from a stall. Catch it before delivery stops.
  • Track num_redelivered as a rate. It is the earliest signal of AckWait misconfiguration and poison-message loops.
  • Test failure modes in staging. Kill a consumer, slow a consumer, and poison a message deliberately, and verify your alerts fire. The interaction between MaxAckPending, AckWait, redelivery, and retention policy creates failure modes teams only discover during incidents.
  • Do not rely on server health as a proxy. /healthz green means the server process is operational. It says nothing about whether any given consumer is keeping up.

How Netdata helps

  • Netdata collects the aggregate JetStream signals from /jsz (storage, message counts, API totals and errors), which tell you whether lag is a consumer problem or a subsystem problem.
  • Correlating stream growth (messages rising, first_seq static) against API error and inflight rates separates a stalled consumer from a JetStream subsystem that is slow for everyone.
  • Per-consumer lag (num_pending, num_ack_pending) requires polling /jsz?consumers=true; pair Netdata’s server-level metrics with a small per-consumer poller or exporter for the critical durable consumers, and alert on the growth rate.
  • Anomaly detection on publish and delivery rates flags the divergence (publish rate steady, delivery rate falling) that precedes visible backlog, often before absolute thresholds trip.