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-scram-auth-mismatch ▌

Operations Guides

PgBouncer SCRAM / auth_type mismatch: md5 vs scram-sha-256 login failures

Clients cannot log in through PgBouncer. Authentication fails with errors that look like wrong passwords, but the passwords are correct and PostgreSQL accepts them on direct connection.

The root cause is a mismatch between PgBouncer’s auth_type and PostgreSQL’s password_encryption or pg_hba.conf method. PostgreSQL 14+ defaults to scram-sha-256 for password_encryption. Deployments that upgrade PostgreSQL without updating PgBouncer’s auth configuration break silently because the authentication mechanisms are incompatible, not the credentials.

This article covers how to identify the specific mismatch, align auth_type with PostgreSQL’s password method, store SCRAM verifiers correctly, and migrate from md5 to scram without breaking existing connections.

What this means

PgBouncer authenticates in two phases. First, it authenticates the incoming client connection against its own auth_file or via auth_query, governed by auth_type. Second, it authenticates itself to PostgreSQL, governed by the credentials it holds and what PostgreSQL’s pg_hba.conf accepts. A mechanism mismatch in either phase causes failures.

flowchart TD
    A[Client connects] --> B["Phase 1: client auth via auth_type + auth_file"]
    B --> C{Client auth OK?}
    C -->|No| D["Log: SASL or password auth failed"]
    C -->|Yes| E["Phase 2: server auth via pg_hba.conf"]
    E --> F{Server auth OK?}
    F -->|No| G["Log: server login failed
sv_login elevated, pool drains"] F -->|Yes| H[Connection established]

SCRAM-SHA-256 pass-through (PgBouncer 1.14+) adds a constraint. PgBouncer can relay the client’s SCRAM exchange to PostgreSQL without storing the plaintext password, but only if the SCRAM verifier in auth_file (or returned by auth_query) is byte-identical to what PostgreSQL stores in pg_authid. The same password encrypted with a different salt or iteration count produces a different verifier. Pass-through fails because the keys do not match.

The most confusing variant: auth_type=md5 with md5 hashes in auth_file works for client-to-PgBouncer authentication. But when PgBouncer tries to authenticate to a PostgreSQL that requires scram-sha-256 and stores SCRAM verifiers, the server connection fails. Clients connect to PgBouncer but queries error out. Logs show “server login failed” while clients see intermittent connectivity or timeouts.

Common causes

CauseWhat it looks likeFirst thing to check
auth_type=scram-sha-256, auth_file has only md5 hashesEvery client login fails immediately with “SASL authentication failed”grep auth_file for SCRAM-SHA-256 prefix
auth_type=md5, auth_file has md5 hashes, PostgreSQL uses scram-sha-256Clients connect to PgBouncer but queries fail; sv_login stays elevated; logs show “server login failed”Check PostgreSQL password_encryption setting
SCRAM verifier mismatchServer login fails consistently; same password works via direct psqlCompare verifier bytes in auth_file to pg_authid.rolpassword
SCRAM secret used for auth_userauth_query fails or returns unusable credentialsCheck if auth_user has a SCRAM hash instead of plaintext in auth_file
user= in database definition with SCRAM pass-throughSCRAM pass-through silently bypassed; server auth may failRemove user= from [databases] section, let client provide username
Stale auth_file after password rotationFailures begin immediately after credential changeVerify auth_file was updated and RELOAD was issued

Quick checks

# Check PgBouncer's current auth_type
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -Atc "SHOW CONFIG;" | grep auth_type

# Check PostgreSQL's password encryption method
psql -h <postgres_host> -U postgres -Atc "SHOW password_encryption;"

# Check what pg_hba.conf requires for your connection
psql -h <postgres_host> -U postgres -Atc "SELECT type, database, user, auth_method FROM pg_hba_file_rules WHERE auth_method IN ('scram-sha-256', 'md5') LIMIT 10;"

# Inspect auth_file contents for SCRAM vs md5 format
grep -c 'SCRAM-SHA-256' /etc/pgbouncer/userlist.txt
grep -c 'md5' /etc/pgbouncer/userlist.txt

# Check how PostgreSQL stores a specific user's password
psql -h <postgres_host> -U postgres -Atc "SELECT rolname, left(rolpassword, 20) FROM pg_authid WHERE rolname = 'app_user';"

# Look for authentication failures in PgBouncer logs
grep -iE "authentication failed|SASL|login failed|server login" /var/log/pgbouncer/pgbouncer.log | tail -20

# Check sv_login for stuck backend authentication
# Column position varies by PgBouncer version; $(NF-3) is portable across layouts
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -Atc "SHOW POOLS;" | awk -F'|' '{print $1, $2, "sv_login="$(NF-3)}'

# Check PgBouncer version for SCRAM support (1.11+ for auth, 1.14+ for pass-through)
psql -h 127.0.0.1 -p 6432 -U pgbouncer pgbouncer -Atc "SHOW VERSION;"

How to diagnose it

Step 1: Identify which phase is failing. PgBouncer log messages distinguish client-side auth failures from server-side failures.

Client-side failures (client cannot authenticate to PgBouncer):

  • “SASL authentication failed” - client did not complete SCRAM correctly, or PgBouncer’s auth_file has the wrong verifier
  • “password authentication failed” - md5 mismatch between client and auth_file
  • “SCRAM authentication failed: user has MD5 secret” - PgBouncer has an MD5 verifier but SCRAM is expected (auth_type=scram-sha-256). Conversely, when auth_type=md5 and auth_file contains a SCRAM secret, PgBouncer automatically switches to SCRAM, and an MD5-only client fails the exchange

Server-side failures (PgBouncer authenticated the client but cannot authenticate to PostgreSQL):

  • “server login failed: ” or “closing because: login failed” - PostgreSQL rejected PgBouncer’s credentials
  • “server login failed” with the PostgreSQL error message, or a connection timeout (from server_connect_timeout, default 15s) logged as “sbuf_connect failed to connect to
    : ”

Step 2: Compare auth mechanisms across all three layers. The chain is: client auth method, then PgBouncer auth_type, then auth_file contents, then PgBouncer-to-PostgreSQL auth, then pg_hba.conf, then PostgreSQL stored password format. All must be compatible.

Step 3: Verify the SCRAM verifier if using pass-through. If auth_type is scram-sha-256 or auth_type is md5 with SCRAM secrets in auth_file, the verifier must match PostgreSQL’s stored verifier byte-for-byte. Extract the exact verifier from PostgreSQL:

-- On PostgreSQL, get the exact SCRAM verifier for a user
SELECT rolpassword FROM pg_authid WHERE rolname = 'app_user';

Compare this to the entry in auth_file. They must be identical, including iteration count and salt.

Step 4: Check for version-specific behavior. PgBouncer 1.11 added SCRAM authentication support. PgBouncer 1.14 added SCRAM pass-through. If your PgBouncer is older than 1.14, it cannot relay SCRAM to PostgreSQL using stored verifiers. Check SHOW VERSION.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
sv_login (SHOW POOLS)Backend connections stuck authenticating indicate server-side auth failuresv_login > 0 sustained, especially with cl_waiting growing
Auth failure rate in logsPgBouncer has zero error counters in SHOW commands; logs are the only sourceSpike in “SASL authentication failed” or “server login failed” messages
cl_waiting (SHOW POOLS)Clients queue when no server connections can be establishedGrowing queue with sv_login elevated
Admin console responsivenessAuth-related churn can slow the event loopSHOW LISTS taking >200ms
PostgreSQL password_encryptionDetermines how PostgreSQL stores passwords and what pg_hba.conf methods workValue changed to scram-sha-256 after upgrade without PgBouncer config update

Fixes

Align auth_type with PostgreSQL’s password method

If PostgreSQL uses scram-sha-256 (the default since PostgreSQL 14), set PgBouncer’s auth_type to scram-sha-256 and ensure auth_file contains SCRAM verifiers:

# pgbouncer.ini
auth_type = scram-sha-256
auth_file = /etc/pgbouncer/userlist.txt

auth_type is reloadable. Apply the change with RELOAD and verify with SHOW CONFIG.

Store SCRAM verifiers correctly in auth_file

The auth_file must contain the exact SCRAM verifier from PostgreSQL, in double-quoted format:

"app_user" "SCRAM-SHA-256$4096:somebase64salt$storedkey:serverkey"

To populate auth_file from PostgreSQL, query the stored verifier directly:

# Extract SCRAM verifiers from PostgreSQL and format for auth_file
psql -h <postgres_host> -U postgres -Atc \
  "SELECT '\"' || rolname || '\" \"' || rolpassword || '\"' FROM pg_authid WHERE rolcanlogin;" \
  > /etc/pgbouncer/userlist.txt

Then RELOAD PgBouncer.

If you are using auth_type=md5 but auth_file contains SCRAM verifiers, PgBouncer 1.11+ automatically uses SCRAM for that user. This backward-compatibility path works for client-to-PgBouncer auth. For server auth, the SCRAM pass-through path (1.14+) handles relay to PostgreSQL if the verifier matches.

Use auth_query instead of static auth_file

With auth_query, PgBouncer fetches credentials from PostgreSQL at login time. This eliminates stale auth_file problems entirely:

# pgbouncer.ini
auth_type = scram-sha-256
auth_query = SELECT rolname, CASE WHEN rolvaliduntil < now() THEN NULL ELSE rolpassword END FROM pg_authid WHERE rolname=$1 AND rolcanlogin

The auth_user must connect with a plaintext password, not a SCRAM secret. PgBouncer cannot derive client-side SCRAM keys from a server-side verifier, so a SCRAM hash for auth_user in auth_file will not work for the bootstrap connection. Store the auth_user entry with a plaintext password.

Note: reading rolpassword from pg_authid requires superuser or appropriate grants. Create a dedicated role with SELECT on pg_authid or use a custom SECURITY DEFINER function.

Handle SCRAM pass-through requirements

For SCRAM pass-through to work, three conditions must hold:

  • No user= override in the [databases] section for the target database. If user= is specified, PgBouncer uses fixed credentials instead of relaying the client’s SCRAM exchange.
  • Verifier must match. The SCRAM verifier in auth_file (or from auth_query) must be byte-identical to PostgreSQL’s stored verifier. Different salt or iteration count means the verifier is different.
  • Client must use SCRAM. If the client authenticates to PgBouncer using md5, PgBouncer has no SCRAM keys to relay. The error “cannot do SCRAM authentication: password is SCRAM secret but client authentication did not provide SCRAM keys” indicates exactly this situation.

Migrate from md5 to scram-sha-256

To migrate cleanly:

  1. Ensure PgBouncer is version 1.14 or later (required for SCRAM pass-through).
  2. Set PostgreSQL’s password_encryption to scram-sha-256.
  3. Re-encrypt all user passwords in PostgreSQL. This requires knowing or resetting each password:
-- WARNING: this changes the stored password hash.
-- All connections using this credential are affected.
-- Ensure the application has the correct password configured.
ALTER ROLE app_user PASSWORD 'the_actual_password';

PostgreSQL stores the new password using the current password_encryption setting.

  1. Export the new SCRAM verifiers to auth_file (see above).
  2. Change PgBouncer auth_type to scram-sha-256.
  3. Apply the change and verify with a test connection through PgBouncer.

During migration, auth_type=md5 with SCRAM secrets in auth_file provides a transitional state where PgBouncer handles both md5 and SCRAM clients. Once all clients are confirmed using SCRAM, switch auth_type to scram-sha-256.

Prevention

  • Track PostgreSQL version defaults. PostgreSQL 14 changed the default password_encryption to scram-sha-256. Upgrades without updating PgBouncer auth configuration are the most common cause of this failure.
  • Monitor auth failure rates from logs. PgBouncer exposes zero error counters in SHOW commands. Parse logs for “SASL authentication failed”, “password authentication failed”, and “server login failed”.
  • Automate auth_file synchronization. If using a static auth_file, sync it from pg_authid after any password change. Stale auth_file is the second most common cause after version upgrades.
  • Use auth_query where possible. auth_query eliminates the stale auth_file problem by fetching credentials live from PostgreSQL. Ensure auth_user has a plaintext password, not a SCRAM secret.
  • Pin and document PgBouncer version. SCRAM behavior changed across 1.11, 1.14, 1.16, 1.17, and 1.25. Know your version’s capabilities before troubleshooting.
  • Test after credential rotation. Any password change, PostgreSQL upgrade, or PgBouncer config change should be followed by a functional login test through PgBouncer, not just a direct PostgreSQL connection.

How Netdata helps

  • Log-based auth failure detection. Since PgBouncer exposes zero error counters in SHOW commands, Netdata’s log parser can surface spikes in “SASL authentication failed” and “server login failed” messages as anomalies, turning a log-only signal into an alertable metric.
  • sv_login correlation. Netdata collects sv_login per pool at per-second resolution. A sustained sv_login elevation with growing cl_waiting distinguishes backend auth failure from pool exhaustion.
  • PostgreSQL password_encryption visibility. Netdata’s PostgreSQL collector surfaces the password_encryption setting, making it visible when a PostgreSQL upgrade changes the default.
  • Change correlation. When auth failures begin, Netdata’s anomaly detection correlates them with nearby events such as PostgreSQL restarts, PgBouncer RELOAD operations, or configuration deployments, narrowing the cause window.
  • Connection churn detection. A spike in new connection attempts following a credential rotation or upgrade, visible in cl_active and cl_waiting patterns, often signals the onset of an auth mismatch problem.