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-auth-query-failures ▌

Operations Guides

PgBouncer auth_query failures: the authentication dependency loop on PostgreSQL

Clients cannot connect. The PgBouncer log fills with “password authentication failed” and “S: login failed” messages. SHOW POOLS shows sv_login connections stuck in the login state, cl_waiting climbing. If you use auth_query to authenticate clients against PostgreSQL, the root cause may be neither a wrong password nor a down database: it may be the circular dependency that auth_query creates between the pooler and the backend.

auth_query tells PgBouncer to authenticate each connecting client by running a SQL query against PostgreSQL to look up that user’s password hash. You still need auth_file (userlist.txt) for auth_user credentials, but you do not need to sync every application user’s password into it. The cost: every new client connection requires a working PostgreSQL connection before the client can be pooled. When PostgreSQL is healthy, this is invisible. When PostgreSQL is under load, or when PgBouncer restarts and hundreds of clients re-authenticate simultaneously, auth_query becomes the bottleneck that amplifies the outage.

What this means

The authentication path for each client is:

  1. Client connects to PgBouncer.
  2. PgBouncer opens a connection to PostgreSQL as auth_user.
  3. PgBouncer runs the configured auth_query SQL to retrieve the connecting user’s password hash.
  4. PgBouncer validates the client’s supplied password against the returned hash.
  5. If valid, PgBouncer authenticates to PostgreSQL as the target user and assigns a pooled server connection.

Step 2 is where the dependency loop lives. The auth_user connection competes for the same PostgreSQL connection slots that the client is ultimately trying to use. Under normal load, auth_user connections are short-lived and cheap. Under stress, they become another consumer of an already-saturated backend.

The feedback loop: PostgreSQL is overloaded, so auth queries take longer. Clients wait longer to authenticate. Applications time out and retry. Each retry triggers another auth query. More auth queries consume more PostgreSQL resources. The cycle accelerates.

A failed auth_query means the query returned no row for the user (user does not exist, cannot log in, or auth_user lacks permission to read pg_authid), or the returned password hash did not match what the client supplied. But the failure mode is worse than a simple password mismatch because of the blocking behavior: if auth_user itself cannot connect to PostgreSQL (wrong credentials, network issue, PostgreSQL at max_connections), PgBouncer retries the auth_user connection every server_login_retry seconds (default: 15s) until query_wait_timeout expires (default: 120s). The client is blocked the entire time.

PgBouncer treats a NULL returned password as an impossible MD5 value, so the client sees a password failure; if the query returns no row at all, the client receives the more direct “no such user” error.

flowchart TD
    A[Client connects to PgBouncer] --> B[auth_query connects to PostgreSQL]
    B --> C{PostgreSQL responsive?}
    C -->|Yes| D[Client authenticated and pooled]
    C -->|No: overloaded or full| E[auth_query slow or fails]
    E --> F[Client blocked up to 120s]
    F --> G[Application times out and retries]
    G --> H[New connections trigger more auth queries]
    H --> B
    E --> I[sv_login stuck, pool drains]
    I --> H

Common causes

CauseWhat it looks likeFirst thing to check
auth_user credentials wrong or missing from auth_file“S: login failed” in log, sv_login stuck, clients blocked for 120sSHOW CONFIG for auth_user, verify entry in userlist.txt
Password hash mismatch (SCRAM vs MD5)“password authentication failed” for specific usersauth_type setting vs hash format returned by auth_query
auth_user password stored as SCRAM hash in auth_fileauth_user cannot connect to backend at alluserlist.txt: auth_user password must be plain text or MD5, not SCRAM
PostgreSQL at max_connectionssv_login high, “too many connections” in PostgreSQL logpg_stat_activity count vs max_connections on PostgreSQL
auth_query function missing or auth_user lacks permissionauth_query returns no rows for all usersVerify auth_user can SELECT from pg_authid or execute the auth function
pg_hba.conf missing target user entriesClient passes PgBouncer auth but server connection failspg_hba.conf must allow both auth_user and target application user
Thundering herd on restartAll pools show sv_login spike simultaneously after restartCheck PgBouncer uptime, connection churn in log
VALID UNTIL expiry after upgradePreviously working users suddenly fail authCheck rolvaliduntil for affected users

Quick checks

# Check auth_query configuration
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -c "SHOW CONFIG;" | grep -E "auth_type|auth_user|auth_query|auth_dbname"

# Check for connections stuck in backend login state
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -c "SHOW POOLS;"

# Check for clients stuck in PgBouncer's own auth phase
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -c "SHOW LISTS;"

# Grep recent auth failures in the log
grep -E "auth failed|login failed|S: login" /var/log/pgbouncer/pgbouncer.log | tail -30

# Test auth_user can connect to PostgreSQL and run the auth query
psql -h <postgres_host> -p 5432 -U <auth_user> -d postgres -c \
  "SELECT rolname, rolpassword FROM pg_authid WHERE rolname='test_user' AND rolcanlogin;"

# Check PostgreSQL connection saturation
psql -h <postgres_host> -p 5432 -U postgres -c \
  "SELECT count(*) AS active, (SELECT setting::int FROM pg_settings WHERE name='max_connections') AS max_conn FROM pg_stat_activity;"

How to diagnose it

  1. Check whether auth_user can connect to PostgreSQL at all. If auth_user credentials are wrong, every client authentication fails and blocks for up to query_wait_timeout (120s). Test the auth_user connection directly from the PgBouncer host. If this fails, fix auth_user credentials before anything else.

  2. Examine sv_login in SHOW POOLS. A sustained non-zero sv_login means PgBouncer is churning through backend connection attempts. If sv_login is high but sv_active is low, connections are failing during login, not being held by slow queries.

  3. Check the auth_user password format in auth_file. When auth_type=scram-sha-256, the auth_user’s password in userlist.txt must be in plain text or MD5 format, not a SCRAM-SHA-256 hash. PgBouncer uses this password to establish its own connection to PostgreSQL as auth_user. A SCRAM secret cannot be used to initiate a new connection. This is the most common auth_query setup mistake.

  4. Verify auth_query returns the expected hash format. The query must return a password hash that matches auth_type. If auth_type is scram-sha-256, the query must return the SCRAM-SHA-256 hash from pg_authid.rolpassword. If the query returns an MD5 hash instead, authentication fails for every user.

  5. Check pg_hba.conf on PostgreSQL. PgBouncer logs in as auth_user to run the auth query, then logs in again as the target user to establish the pooled connection. Both logins must be permitted by pg_hba.conf. A common mistake is configuring pg_hba.conf for auth_user but forgetting the target application users.

  6. Check PostgreSQL connection saturation. If PostgreSQL is at max_connections, auth_user cannot connect to run the auth query, and no new clients can be authenticated. This is the dependency loop in its purest form: the pooler needs a PostgreSQL connection to authenticate clients, but PostgreSQL has no connections to give.

  7. Check whether the failure started after a PgBouncer upgrade. PgBouncer 1.24.1 changed the default auth_query to include a VALID UNTIL check. The default query now wraps rolpassword in CASE WHEN rolvaliduntil < now() THEN NULL ELSE rolpassword END, returning NULL for expired passwords. Users whose rolvaliduntil has passed will fail authentication on the new default query even though they succeeded on the old one.

The change shipped in PgBouncer 1.24.1 as the fix for CVE-2025-2291.

  1. Check for search_path injection if running an older version. PgBouncer 1.25.1 fixed CVE-2025-12819: before that release, an untrusted search_path in the client StartupMessage could allow SQL injection during the auth_query handler. The vulnerability applied before 1.25.1 when track_extra_parameters included search_path, auth_user was set to a non-empty value, and auth_query did not use fully-qualified object names (the default query met the last condition). Upgrade or use fully-qualified object names in auth_query.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
sv_login (SHOW POOLS)Connections stuck authenticating with PostgreSQLSustained non-zero with low sv_active
login_clients (SHOW LISTS)Clients stuck in PgBouncer’s own auth phaseAny sustained non-zero value
cl_waiting (SHOW POOLS)Clients queued waiting for authenticated connectionsGrowing while sv_login is elevated
query_wait_timeout events (log)Clients blocked for full timeout durationAny occurrence means auth path was blocked for 120s
Authentication failure rate (log)Failed logins to PgBouncerSpike above baseline from many users simultaneously
PostgreSQL connection countBackend saturation blocking auth_userApproaching max_connections
avg_query_time (SHOW STATS)Backend slowdown making auth queries slowElevated baseline indicates PostgreSQL under stress

PgBouncer has zero error counters in any SHOW command. Authentication failure counts, connection rejection counts, and timeout events appear only in log files. Any monitoring strategy that relies solely on SHOW commands is blind to auth_query failures.

Fixes

Fix auth_user credentials and password format

If auth_user cannot connect to PostgreSQL, nothing else works. Verify the auth_user password in auth_file (userlist.txt) is correct and in the right format. For auth_type=scram-sha-256, the password must be plain text or MD5 in the file, not a SCRAM-SHA-256 hash. After updating auth_file, run RELOAD on PgBouncer.

Break the dependency loop with auth_dbname

By default, auth_query runs against the same database the client is connecting to. If that database is overloaded, auth_query is slow. If you use a custom SECURITY DEFINER function for auth_query, it must be installed in every target database.

auth_dbname is a PgBouncer setting added in 1.21.0; it can be set globally or overridden in a [databases] connection string. It names the database entry to use for authentication, decoupling authentication from the workload of any individual application database and eliminating the need to install the auth function in every database.

Reserve a PostgreSQL connection slot for auth_user

PostgreSQL reserves connections for superusers via superuser_reserved_connections. If auth_user has SUPERUSER privilege, it can connect using these reserved slots even when PostgreSQL is at max_connections for normal users. This ensures auth_user can always run auth queries during a connection storm.

The tradeoff is security: auth_user with SUPERUSER carries elevated privileges. PostgreSQL 16 introduced reserved_connections and the pg_use_reserved_connections predefined role, which offer slot reservation without SUPERUSER.

Stagger restarts to avoid thundering herd

When PgBouncer restarts, all server connections are lost and every client triggers a new auth query simultaneously. With auth_query, this means hundreds of concurrent auth_user connections hitting PostgreSQL at once, each competing for the connections they are trying to establish. Mitigations:

  • Set min_pool_size above zero to pre-warm connections at startup, reducing the burst.
  • Use rolling restarts across multiple PgBouncer instances if running behind a load balancer.
  • Ensure PostgreSQL max_connections can absorb the login storm from all PgBouncer instances simultaneously.

Fix pg_hba.conf for both auth_user and target users

PgBouncer connects as auth_user to run the query, then connects as the target user for the actual session. Both paths must be allowed in pg_hba.conf. The typical mistake is adding auth_user but missing application users.

Prevention

  • Reserve a dedicated PostgreSQL slot for auth_user. If auth_user can always connect, authentication survives load spikes that would otherwise cascade into full outages.
  • Use auth_dbname to isolate auth queries. Route auth queries to a database that is not under application load.
  • Monitor sv_login and login_clients. These are early warning signals. Sustained non-zero sv_login with low sv_active means connections are failing to establish, not being held by slow queries.
  • Parse the PgBouncer log for auth failures. No SHOW command exposes failure counts. Set up log-based alerting for “auth failed”, “S: login failed”, and “query_wait_timeout” patterns.
  • Verify the auth_user password format after any auth_type change. Switching auth_type to scram-sha-256 requires the auth_user password to be plain text or MD5 in auth_file. Easy to miss during security hardening.
  • Test the restart path. PgBouncer restart with auth_query creates a synchronized auth storm. Measure how long pool recovery takes under realistic load. If recovery exceeds 60 seconds, add min_pool_size or stagger client reconnection.

How Netdata helps

The key correlations for catching auth_query failures before they cascade:

  • sv_login per second: catches auth_user connection failures early, before cl_waiting grows and clients time out.
  • cl_waiting and maxwait correlation with sv_login: distinguishes “auth path is blocked” from “pool is exhausted by slow queries.”
  • PostgreSQL connection utilization cross-correlated with sv_login: reveals when backend saturation is the root cause, not a PgBouncer config issue.
  • avg_query_time and avg_wait_time side by side: elevated avg_query_time with growing avg_wait_time indicates PostgreSQL slowdown propagating through the auth path into client-visible latency.
  • Log anomaly detection on auth failure patterns: provides the error signal that SHOW commands cannot expose.