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 / pgbouncer / pgbouncer-advisory-locks-transaction-mode ▌

Operations Guides

PgBouncer advisory locks in transaction mode: orphaned locks and mysterious contention

Your application takes an advisory lock with pg_advisory_lock(), does its work, releases it, and moves on. Except under load, other parts of the application start blocking on that same lock, or timing out waiting for it. The application is sure it released the lock. PostgreSQL’s lock views, looked at from the wrong place, show nothing. PgBouncer’s metrics are completely healthy: no waiting clients, no queue, normal wait times.

This is not a saturation problem and not a bug in PgBouncer. It is a semantic mismatch between how advisory locks work in PostgreSQL and how transaction pooling reassigns server connections.

What this means

PostgreSQL has two families of advisory locks. Session-level locks (pg_advisory_lock()) are held until they are explicitly unlocked or the session ends, and they survive transaction boundaries. Transaction-level locks (pg_advisory_xact_lock()) are released automatically when the transaction commits or rolls back.

In transaction pooling mode, PgBouncer returns the server connection to the pool the moment a transaction finishes. The next transaction from the same application client will, in general, land on a different server connection. PgBouncer’s own feature compatibility table marks session-level advisory locks as incompatible with transaction pooling, for exactly this reason.

So when application code runs SELECT pg_advisory_lock(42) inside a transaction:

  1. PgBouncer assigns server connection C1 to the client.
  2. The lock is acquired on the PostgreSQL session behind C1.
  3. The transaction commits. PgBouncer returns C1 to the idle pool.
  4. The lock is still held on C1. The application believes it is free to proceed, or believes its later pg_advisory_unlock() released it.
  5. The next transaction lands on C2. C2 does not hold the lock. Other clients that try to take the lock on their own connections block, because C1 still holds it.

The lock is orphaned: held on a pooled connection that nobody is currently using, invisible to the application that acquired it. Reusing C1 for other transactions does not release it; only the session ending (connection recycled or closed) or an unlock executed on that exact session does. Other clients block on it indefinitely. This is the “mysterious contention”: lock waits with no apparent holder, intermittent and hard to reproduce, with every infrastructure metric green.

flowchart TD
  A[App tx1: pg_advisory_lock] --> B[PgBouncer assigns conn C1]
  B --> C[Lock acquired on C1 session]
  C --> D[COMMIT: C1 returns to idle pool]
  D --> E[Lock still held on C1. App believes it released it]
  F[App tx2: lock or unlock attempt] --> G[PgBouncer assigns conn C2]
  G --> H[C2 does not own the lock: blocks or warns]
  E -->|held until C1 session ends| H

The single-user trap makes this worse. In testing, with one client and low concurrency, the same server connection tends to be reused, so acquire and unlock land on the same session and everything works. The failure only appears under production concurrency, when the pool actually multiplexes.

Common causes

CauseWhat it looks likeFirst thing to check
Session-level pg_advisory_lock() used through transaction poolingIntermittent lock waits and timeouts, no visible holder, only under concurrent loadSHOW DATABASES or SHOW CONFIG for pool_mode; grep app code for pg_advisory_lock
Unlock executed on a different pooled connectionPostgreSQL logs contain WARNING: you don't own a lock of type ExclusiveLock, usually invisible to the appPostgreSQL logs for the unlock warning
Framework takes advisory locks internally (migration locking, distributed lock libraries)Contention during deploys or migrations, or in background job coordinators, with no advisory lock calls in your own codeFramework docs and config for advisory lock usage
Statement pooling modeSame orphaned-lock behavior, plus broken multi-statement transactionspool_mode = statement in config

A note on frameworks: some libraries acquire session-level advisory locks behind your back. Rails’ ActiveRecord, for example, uses a session-level advisory lock by default to serialize migrations, which breaks under transaction pooling; Rails lets you disable it with advisory_locks: false in database.yml; that option has existed since Rails 6.0.0. Distributed-lock libraries have the same exposure unless they offer a transaction-scoped lock mode. If you see advisory lock contention but your own code never calls pg_advisory_lock, audit the frameworks.

Quick checks

All read-only and safe to run during an incident.

# Confirm the pooling mode per database
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -c "SHOW DATABASES;"
# or globally:
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -Atc "SHOW CONFIG;" | grep pool_mode
# Confirm PgBouncer looks healthy (this is the trap: it will)
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -Atc "SHOW POOLS;"
# cl_waiting = 0, maxwait = 0, normal sv_active: consistent with this failure mode

The decisive check must run against PostgreSQL directly, bypassing PgBouncer. The orphaned lock lives on a pooled server-side session, so query pg_locks on the backend itself:

-- Advisory locks currently held anywhere on the server
SELECT pid, locktype, classid, objid, mode, granted
FROM pg_locks
WHERE locktype = 'advisory';
-- Sessions currently blocked, and what is blocking them
SELECT pid, state, wait_event_type, wait_event,
       now() - query_start AS blocked_for, query
FROM pg_stat_activity
WHERE wait_event IS NOT NULL
ORDER BY blocked_for DESC;

If sessions are waiting on an advisory lock while pg_locks shows it granted to a backend whose state in pg_stat_activity is idle (a pooled connection sitting in PgBouncer’s idle list), you have found the orphan.

# The smoking gun in PostgreSQL logs
grep -i "you don't own a lock" /var/log/postgresql/*.log

How to diagnose it

  1. Reproduce the shape of the symptom. Confirm the contention is on an advisory lock, not a row or table lock. In pg_locks, orphaned entries have locktype = 'advisory' and granted = true on a backend that is doing nothing.
  2. Check the pooling mode. SHOW DATABASES and SHOW CONFIG on the PgBouncer admin console. If the affected database runs in transaction or statement mode and anything in the request path uses session-level advisory locks, the mechanism matches.
  3. Find the orphan. Query pg_locks and pg_stat_activity directly on PostgreSQL. Correlate the lock-holding PID with a backend whose state is idle. That idle backend is one of PgBouncer’s pooled server connections holding the lock for nobody.
  4. Confirm the unlock warning. Search PostgreSQL and application logs for you don't own a lock of type ExclusiveLock. Its presence proves acquire and unlock landed on different sessions.
  5. Identify the source. Grep the application codebase for pg_advisory_lock. If nothing turns up, audit frameworks: migration locking, distributed-lock libraries, job schedulers. Check when the behavior started against deploy history and any switch from session to transaction pooling.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
Advisory locks in pg_locks (queried on PostgreSQL directly)This is where orphaned locks actually appearLocks granted to idle backends with no active query
Blocked sessions in pg_stat_activitySurfaces the contention the application is feelingSessions waiting on an advisory lock for more than a few seconds
cl_waiting / maxwait (SHOW POOLS)Baseline confirmation that the pool itself is fine; healthy values here are part of the diagnostic signatureDo not rule the lock problem out because these are green
avg_wait_time (SHOW STATS)PgBouncer-injected latency; stays low here because the block happens inside PostgreSQLLow wait time plus application-side lock timeouts points away from pool exhaustion and toward backend lock waits
Unlock warning in logsDirect evidence of cross-connection acquire/unlockAny occurrence of you don't own a lock of type ExclusiveLock
server_lifetime / server_idle_timeout configurationDetermines how long an orphaned lock can persist: the lock dies with the sessionLong or disabled recycling means orphans live longer

Note the instrumentation gap: PgBouncer has no signal for this at all. It passes queries through without inspecting them, and its metrics cover pool health, not lock semantics. Detection lives on the PostgreSQL side and in logs.

Fixes

Use transaction-scoped advisory locks

Replace pg_advisory_lock() with pg_advisory_xact_lock() and drop the explicit unlock. The lock is released automatically at commit or rollback, before PgBouncer returns the connection to the pool, so nothing can be orphaned. This is the correct fix when the lock’s scope is naturally “the duration of this unit of work,” which covers most advisory lock uses (job de-duplication, migration guards, critical sections around a write).

Tradeoff: the lock cannot span multiple transactions. If your design genuinely needs a lock held across transaction boundaries on one logical session, this fix does not apply; use session pooling instead.

Route advisory-lock workloads through session pooling

Set pool_mode = session for the specific database or user that uses session-level advisory locks. In session mode the server connection is held for the entire client session, so acquire, hold, and unlock all land on the same PostgreSQL session and the semantics work as the application expects.

Tradeoff: you give up multiplexing for that pool. Each client session pins a server connection for its lifetime, so the pool behaves like direct connections and must be sized accordingly. Scope the override to just the workload that needs it (a dedicated database entry or user) rather than flipping the whole instance.

Clear an existing orphaned lock

The lock is released only when the holding session ends or unlocks. As containment during an incident, two options:

  • Targeted: identify the idle backend holding the lock in pg_locks and terminate it with SELECT pg_terminate_backend(<pid>) against PostgreSQL directly. PgBouncer tolerates a pooled server connection disappearing and will open a fresh one. This kills exactly the orphaned session.
  • Broad: the RECONNECT admin command on the PgBouncer console closes all server connections and forces new ones, dropping every orphaned lock along with them. This disrupts every pool on the instance, so use it deliberately.

Both are cleanup, not a fix. Tuning server_lifetime or server_idle_timeout down bounds how long a future orphan can survive, but only the code or pool mode change stops orphans from being created.

Fix the framework, not just the query

If a framework is the source, change its configuration rather than wrapping it. For Rails migrations, that is advisory_locks: false plus an operational rule that migrations never run concurrently. For distributed-lock libraries, use their transaction-scoped lock mode if one exists. Do not rely on server_reset_query to paper over this: PgBouncer does not run reset queries between transactions in transaction pooling mode, which is exactly the gap that creates the orphan in the first place.

Prevention

  • Audit before switching pool modes. Any move to transaction or statement pooling must come with a code and framework audit for session-dependent features: advisory locks, prepared statements, temp tables, SET variables, LISTEN/NOTIFY. The failure is silent in testing and loud in production.
  • Standardize on pg_advisory_xact_lock() anywhere the codebase runs behind PgBouncer. Make the session-level variant a code review flag.
  • Test under real concurrency. Single-user and low-concurrency tests pass because connection reuse masks the reassignment. Lock-related integration tests need enough parallel workers to force pool multiplexing.
  • Alert on the lock state, not the pool. A periodic check for advisory locks held by idle backends, and log alerting on the unlock warning, catch recurrence in minutes instead of after a user report.
  • Document the constraint in the runbook for the service: which pooling mode each database uses and which features that forbids.

How Netdata helps

  • Netdata’s PgBouncer collector tracks cl_waiting, maxwait, avg_wait_time, and pool utilization per second, which gives you the negative confirmation fast: the pool is healthy, so the contention is not a pooling capacity problem.
  • Correlating those PgBouncer charts with PostgreSQL-side signals (blocked sessions, lock counts, transaction duration) on one dashboard is what turns “mysterious contention” into a two-minute diagnosis instead of an afternoon.
  • Per-second granularity catches the intermittent pattern typical of this failure: brief lock waits that appear only under concurrency spikes and vanish before a manual check.
  • Historical baselines of PgBouncer metrics let you line the first contention report up against the deploy or config change that introduced transaction pooling.
  • Because PgBouncer exposes no error counters and this failure never touches its metrics, Netdata’s value here is the cross-layer view: PgBouncer green, PostgreSQL lock waits rising, application timeouts rising, all on one timeline.