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 / docker / docker-container-keeps-restarting

Operations Guides

Docker container keeps restarting: causes, checks, and fixes

A container that restarts every few seconds is not self-healing. It is a crash loop that wastes CPU, floods logs, and masks the real failure. Docker’s restart policy can hide whether the application is OOM-killed, segfaulting, or waiting for a dependency that never arrives. This guide shows how to read the signals, map exit codes to causes, and stop the loop before it degrades the host.

What This Means

When a container’s main process exits or is killed, Docker increments RestartCount in the container metadata and starts a new instance if the restart policy allows. The count persists across daemon restarts. A container that crashes immediately on every start creates a death spiral: each cycle truncates ephemeral state, writes new log data, and adds overhead to the daemon and storage driver. The container may appear to be “running” for a few seconds before it disappears again, which makes the failure easy to miss if you only check whether the process exists.

Restart loops are not always caused by the application itself. OOM kills, CPU throttling, misconfigured health checks, missing dependencies, and daemon stress can all produce the same symptom. The key is to distinguish the cause before you try to fix it.

Common Causes

CauseWhat it looks likeFirst thing to check
OOM killExit code 137, OOMKilled true, memory at limitdocker inspect for OOMKilled and memory limit
Application crash or segfaultExit code 1 or 139, logs show panic or stack tracedocker logs --tail for crash output
SIGTERM race or health check killExit code 143, sometimes followed by 137Health check config and stop timeout
Missing dependencyExit code 1 immediately on start, logs show connection refusedReachability of linked services from the container
MisconfigurationExit code 126 or 127, image or entrypoint changeddocker inspect for entrypoint and image tag
CPU throttling or resource starvationSlow starts, health checks timeout, exit 1docker stats and cgroup cpu.stat for throttling

Quick Checks

Run these checks in order. They are all read-only unless noted.

# Check restart count, exit code, and OOM status
docker inspect --format '{{.RestartCount}} {{.State.ExitCode}} {{.State.OOMKilled}}' <container_id>

# List containers currently in a restart loop
docker ps --filter "status=restarting" --format '{{.Names}} {{.Status}}'

# Read recent logs without crashing the client on multi-GB files
docker logs --tail 100 <container_id>

# Check memory usage vs limit
docker stats --no-stream --format "table {{.Name}}\t{{.MemUsage}}\t{{.MemPerc}}" <container_id>

# Check CPU throttling (cgroup v2 path; for v1 use /sys/fs/cgroup/cpu,cpuacct/docker/<id>/cpu.stat)
CONTAINER_ID=$(docker inspect --format '{{.Id}}' <container_id>)
cat /sys/fs/cgroup/system.slice/docker-${CONTAINER_ID}.scope/cpu.stat

# Check for OOM events in the kernel log
dmesg | grep -i "oom\|killed process"

# Stream OOM events from the daemon
docker events --filter event=oom --since 1h

# Check log file size on disk (json-file driver)
ls -lh /var/lib/docker/containers/${CONTAINER_ID}/${CONTAINER_ID}-json.log

# Check health check state
docker inspect --format '{{json .State.Health}}' <container_id>

How To Diagnose It

Follow this flow to classify the failure before you change anything.

flowchart TD
    A[Container restart count increasing] --> B{Check exit code}
    B -->|137| C{OOMKilled true?}
    C -->|Yes| D[OOM kill loop]
    C -->|No| E[External SIGKILL or docker kill]
    B -->|139| F[Segfault or native crash]
    B -->|143| G[SIGTERM race or health check timeout]
    B -->|1| H[Application error or missing dependency]
    B -->|126 / 127| I[Misconfiguration or bad image]
    D --> J[Check memory limit and anon usage]
    E --> K[Check orchestrator events and daemon logs]
    F --> L[Check dmesg and application logs]
    G --> M[Check health check start_period and stop timeout]
    H --> N[Check container logs and dependency reachability]
    I --> O[Verify entrypoint, CMD, and image tag]
  1. Confirm the loop is active. Run docker ps --filter status=restarting or compare RestartCount over a short window. A stable count means the restarts have stopped. A climbing count means the loop is active.

  2. Read the exit code. This is the single most important signal.

    • 137 means SIGKILL. Check OOMKilled. If true, the kernel killed the container for exceeding its memory limit. If false, something else sent SIGKILL.
    • 139 means SIGSEGV. The application crashed in native code.
    • 143 means SIGTERM. This is normal for a graceful stop, but in a restart loop it usually means a health check failed or the stop timeout was reached.
    • 1 is a generic application error. The process exited on its own because of a bug, a missing config file, or a dependency that is unreachable.
    • 126/127 means the command is not executable or not found. This is usually a broken image or a changed entrypoint.
  3. Check recency. docker inspect --format '{{.State.StartedAt}}' tells you whether the restarts are happening back-to-back. If the container runs for 30 seconds and then exits, it may be a slow dependency timeout. If it exits within 1 second, it is likely a crash on startup.

  4. Read the logs. Use docker logs --tail 100 to avoid loading multi-gigabyte log files into the client. Look for stack traces, connection errors, or “out of memory” messages.

  5. Check resources. If the exit code is 137 but OOMKilled is false, look at CPU throttling. High nr_throttled in cpu.stat with moderate CPU usage means the CFS bandwidth controller is pausing the container, which can cause health checks to time out and trigger a restart. Also check whether /var/lib/docker/ is full; disk pressure can cause writes to fail and the application to crash.

  6. Check dependencies. If the logs show connection refused or DNS errors, test reachability from inside the container namespace. A missing database or a stale DNS entry can cause the app to exit immediately.

  7. Check health checks. A container with a short start_period may be marked unhealthy before it finishes initializing. The orchestrator or an operator then sends SIGTERM, producing exit code 143 and a restart. Verify the health check command, the interval, and the start_period.

  8. Pause the restart policy if needed. If the container restarts so fast that you cannot inspect it, run docker update --restart=no <container_id> to freeze the state. Then start it manually, let it fail, and inspect the logs and filesystem before it restarts.

Metrics & Signals To Monitor

SignalWhy it mattersWarning sign
Container RestartCountIdentifies crash loopsIncreasing by more than 1 in 10 minutes for a stable workload
Container exit codeClassifies the failureAny nonzero code for a long-running container
OOMKilled statusDistinguishes OOM from external SIGKILLtrue
Container memory usage vs limitPredicts OOM before it happensSustained usage above 80% of limit
CPU throttling (nr_throttled)Silent cause of slow starts and health failuresAny sustained increase for latency-sensitive workloads
Container health check statusCatches “running but broken” statesunhealthy
Docker daemon response latencyRules out daemon stress causing timeoutsSustained latency above 1 second
Container log file sizeRestart loops generate massive logsAbove 1 GB without rotation
Container start latencySlow starts can trigger health-check killsConsistently above 30 seconds

Fixes

If The Cause Is OOM Kill

Temporarily raise the memory limit to stop the crash loop: docker update --memory <new_limit> <container_id>. Then investigate whether the limit is simply too low or the application has a leak. For JVM workloads, set the heap to roughly 75% of the container limit and leave headroom for metaspace and native memory.

If The Cause Is An Application Crash Or Segfault

Capture the stack trace from docker logs --tail. Exit code 139 indicates a segfault; look for incompatible native libraries or corrupt input data. Exit code 1 usually means an unhandled exception or a missing config file.

If The Cause Is A SIGTERM Race Or Health Check Failure

Increase the health check start_period so the application has enough time to initialize before the first probe. Increase the Docker stop timeout if the application needs more than the default 10 seconds to shut down gracefully. Verify the health check command is correct and not overly aggressive.

If The Cause Is A Missing Dependency

Fix the startup order. Do not rely on restart policies to retry until a dependency is ready. Use explicit orchestration dependencies or init containers. Verify DNS resolution and network connectivity from inside the container.

If The Cause Is Misconfiguration

Check the entrypoint and command in docker inspect. If the image tag was recently updated, verify the binary path and permissions did not change. Exit codes 126 and 127 point directly to permission or path issues.

If The Cause Is CPU Throttling Or Resource Starvation

Increase the CPU quota with docker update --cpus, or remove the limit if noisy-neighbor risk is managed elsewhere. If the application uses a garbage-collected runtime, GC pauses can consume the entire CFS quota in a burst. Consider pinning latency-sensitive workloads to specific cores with cpuset instead of using CFS limits.

Prevention

  • Configure log rotation for the json-file driver by setting max-size and max-file in daemon.json, or switch to the local log driver.
  • Monitor RestartCount and alert on any increase for containers that should be stable.
  • Set memory limits with headroom. Monitor anonymous memory growth in memory.stat, not just total usage, to catch leaks early.
  • Configure health checks with realistic start_period values. Do not let a health check kill a container that is still starting.
  • Clean up stopped containers and unused images automatically. Exited containers consume disk space and clutter state.
  • Treat restart policies as a safety net, not a fix. A container that needs to restart repeatedly is broken and should be investigated.

How Netdata Helps

Netdata correlates container RestartCount spikes with memory usage, CPU throttling, and OOM kill events on the same timeline so you can see whether a restart loop is caused by resource pressure or an application bug. Alerts on exit code 137 with OOMKilled: true distinguish memory kills from external SIGKILL, and daemon API latency charts help rule out Docker stress as the cause of health-check timeouts. Log size monitoring for json-file drivers also catches runaway growth before it fills the disk.

The Netdata solution

Docker monitoring with Netdata

Netdata auto-discovers every container and monitors Docker with per-second CPU, memory, disk, and network metrics plus ML anomaly detection. Catch disk exhaustion, OOM cascades, daemon hangs, and log explosions before they take the host down.