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 / proxysql / proxysql-server-read-only-option ▌

Operations Guides

ProxySQL error 1290 The MySQL server is running with the --read-only option

MySQL error 1290 in a ProxySQL environment is almost always a read/write split misconfiguration: a write query that should have gone to the primary was routed to a read-only replica, and the replica refused it. In ProxySQL, this surfaces in stats_mysql_errors with errno=1290, attributed to a reader hostgroup backend. The proxy is not malfunctioning. It is routing queries exactly as its mysql_query_rules dictate. The rules are wrong.

The fix has two phases: stop the bleeding by deactivating the offending rule, then fix the rule chain so writes route correctly.

What this means

Error 1290 is a MySQL server-side error. It occurs when a backend with read_only=1 receives a write operation (INSERT, UPDATE, DELETE, CREATE, ALTER, and others) and refuses it.

In a ProxySQL read/write split, the monitor module checks each backend’s read_only status and places it in the appropriate hostgroup via mysql_replication_hostgroups. Without that configuration, the read_only monitor check is disabled, and backends stay wherever they were manually assigned in mysql_servers.

When a write query reaches a reader hostgroup backend, the backend returns 1290. ProxySQL forwards this error to the client and records it in stats_mysql_errors. The routing was correct from ProxySQL’s perspective: it followed its rules. The rules were wrong.

flowchart TD
    A["Write query arrives"] --> B["Rules evaluated\nin rule_id order"]
    B --> C{"Write rule matches\nwith apply=1?"}
    C -->|"No: missing, shadowed,\nor no apply=1"| D["Falls through to reader HG\nor default hostgroup"]
    C -->|"Yes"| E["Routed to writer HG"]
    D --> F["read_only replica returns\nerror 1290"]
    E --> G["Primary accepts write"]
    F --> H["Recorded in stats_mysql_errors"]

The classic trigger is the generic ^SELECT routing pattern from the official ProxySQL documentation. It sends all SELECT queries to readers and everything else to the writer. The docs warn against production use because SELECT ... FOR UPDATE is a locking read that must go to the writer but matches ^SELECT and lands on a replica.

Common causes

CauseWhat it looks likeFirst thing to check
Broad read rule shadows write ruleSELECT ... FOR UPDATE matches a ^SELECT rule before a write-specific rule catches itstats_mysql_query_rules: write or FOR UPDATE rule has zero hits
Missing apply=1 on write ruleWrite rule matches but does not stop evaluation; a later read rule overrides the destination hostgroupapply column in runtime_mysql_query_rules
Default hostgroup set to readerQueries not matching any rule fall through to the user’s default_hostgroup, which is a reader hostgroupdefault_hostgroup in runtime_mysql_users
transaction_persistent=1 pinning to readerFirst query in a transaction routed to reader; subsequent writes stay on that backend, bypassing all query rulestransaction_persistent in runtime_mysql_users
New rule inserted with lower rule_idA recently added rule catches queries before the existing write rule, redirecting themCompare rule_id ordering before and after the change
writer_is_also_reader maskingWrites succeed intermittently: some hit the primary (also present in reader HG), some hit actual replicasCheck mysql-writer_is_also_reader global variable

Quick checks

All commands query the ProxySQL admin interface (default port 6032). Replace default credentials (admin/admin) with your actual admin user and password in production.

# Find error 1290 occurrences with hostgroup context
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT hostgroup, username, schemaname, errno, count_star, last_error, last_seen \
      FROM stats_mysql_errors WHERE errno=1290 ORDER BY last_seen DESC LIMIT 20;"
# Check active query rules in evaluation order
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT rule_id, active, match_digest, match_pattern, destination_hostgroup, apply \
      FROM runtime_mysql_query_rules ORDER BY rule_id;"
# Check which rules are actually matching traffic
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT rule_id, hits FROM stats_mysql_query_rules ORDER BY rule_id;"
# Find write queries routed to the reader hostgroup
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT hostgroup, schemaname, username, digest_text, count_star \
      FROM stats_mysql_query_digest \
      WHERE digest_text LIKE 'INSERT%' OR digest_text LIKE 'UPDATE%' OR digest_text LIKE 'DELETE%' \
      ORDER BY count_star DESC LIMIT 20;"
# Check default hostgroup and transaction_persistent per user
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT username, default_hostgroup, transaction_persistent FROM runtime_mysql_users;"
# Verify replication hostgroup mapping (runtime view shows active config)
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT writer_hostgroup, reader_hostgroup, comment FROM runtime_mysql_replication_hostgroups;"
# Check monitor read_only check results
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT Variable_Name, Variable_Value FROM stats_mysql_global \
      WHERE Variable_Name LIKE '%read_only%';"

How to diagnose it

  1. Confirm error 1290 is from a reader hostgroup. Query stats_mysql_errors WHERE errno=1290. The hostgroup column shows which hostgroup returned the error. If it is your reader hostgroup, the query was routed there by a rule or by the default hostgroup.

  2. Identify the affected write statements. Check stats_mysql_query_digest for INSERT, UPDATE, or DELETE digests with a hostgroup value matching your reader hostgroup. Note count_star to gauge blast radius.

  3. Check rule hit distribution before reloading. Query stats_mysql_query_rules for hit counts per rule. A write-routing rule with zero hits is either shadowed by an earlier rule or its regex does not match the incoming query text. This table resets when you reload rules to runtime, so check it before making changes.

  4. Review rule evaluation order. Examine runtime_mysql_query_rules ordered by rule_id. ProxySQL evaluates rules in ascending order. The first matching rule with apply=1 determines the destination hostgroup. If a broad read rule sits before the write rule and matches the query, the write rule is never reached.

  5. Check apply flags. A matching rule without apply=1 does not terminate evaluation. A later rule with a different destination_hostgroup can override it. This is a common source of silent mis-routing: the write rule works in testing because a later read rule happens to send traffic to the writer, but any change to that later rule breaks the chain.

  6. Verify the default hostgroup. If no rule matches, ProxySQL sends the query to the user’s default_hostgroup. If that is a reader hostgroup, every unmatched write goes to a replica.

  7. Check transaction_persistent. When enabled for a user, all queries within a transaction stay on the same backend connection, bypassing query rules entirely. If the first query in a transaction is a SELECT routed to a reader, subsequent writes in that transaction also execute on the reader and return 1290.

  8. Check writer_is_also_reader. If enabled, the primary appears in both the writer and reader hostgroups. Writes routed to the reader hostgroup may succeed when they hit the primary and fail when they hit an actual replica. This makes the error appear intermittent.

Fixes

Immediate: deactivate the offending rule

If you have identified the rule sending writes to the reader hostgroup, deactivate it now:

# Deactivate the offending rule
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "UPDATE mysql_query_rules SET active=0 WHERE rule_id=<problem_rule_id>; \
      LOAD MYSQL QUERY RULES TO RUNTIME;"

Queries that previously hit this rule now fall through to the next matching rule or the default hostgroup. Verify that the fallback destination sends writes to the writer hostgroup, or you trade one routing error for another.

After confirming the fix works, persist it:

mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SAVE MYSQL QUERY RULES TO DISK;"

Fix rule ordering

If a new rule was inserted with a lower rule_id than the write-routing rule, it shadows the write rule. Either move the write rule to a lower rule_id or move the new rule to a higher one.

ProxySQL requires unique rule_id values. Use a temporary high ID for swaps. Verify that ID 9000 (or whatever temporary ID you choose) is not already in use before running this:

# Swap rule_id values to fix evaluation order
# WARNING: verify rule_id 9000 does not exist before running
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "UPDATE mysql_query_rules SET rule_id=9000 WHERE rule_id=<write_rule_id>; \
      UPDATE mysql_query_rules SET rule_id=<write_rule_id> WHERE rule_id=<shadowing_rule_id>; \
      UPDATE mysql_query_rules SET rule_id=<shadowing_rule_id> WHERE rule_id=9000; \
      LOAD MYSQL QUERY RULES TO RUNTIME;"

Add apply=1 to terminal rules

Every routing rule that is meant to be the final destination for a query must have apply=1. Without it, evaluation continues and a later rule can override the destination hostgroup.

# Ensure terminal routing rules stop evaluation
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "UPDATE mysql_query_rules SET apply=1 WHERE rule_id=<rule_id>; \
      LOAD MYSQL QUERY RULES TO RUNTIME;"

Use match_digest for write routing

Instead of enumerating every SELECT variant that must go to the writer (FOR UPDATE, stored function calls, DDL), route by write type. Create explicit rules for write statements using match_digest, then let everything else fall through to the reader hostgroup as the default.

# Route write statements to the writer hostgroup
# Note: DDL (CREATE, ALTER, DROP, TRUNCATE) also needs explicit rules
# or a writer default_hostgroup to avoid 1290 on schema changes.
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) \
      VALUES (10, 1, '^INSERT', <writer_hg>, 1); \
      INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) \
      VALUES (20, 1, '^UPDATE', <writer_hg>, 1); \
      INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) \
      VALUES (30, 1, '^DELETE', <writer_hg>, 1); \
      INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) \
      VALUES (40, 1, '^CREATE', <writer_hg>, 1); \
      INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) \
      VALUES (50, 1, '^ALTER', <writer_hg>, 1); \
      INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) \
      VALUES (60, 1, '^DROP', <writer_hg>, 1); \
      LOAD MYSQL QUERY RULES TO RUNTIME; SAVE MYSQL QUERY RULES TO DISK;"

match_digest matches against the normalized digest text (literals replaced with ?), which is more predictable than matching the full query text with regex. A query like UPDATE users SET name='alice' WHERE id=42 normalizes to UPDATE users SET name=? WHERE id=?, and ^UPDATE matches cleanly.

For SELECT FOR UPDATE specifically, add a rule before the generic SELECT rule:

# Route SELECT FOR UPDATE to the writer
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "INSERT INTO mysql_query_rules (rule_id, active, match_digest, destination_hostgroup, apply) \
      VALUES (5, 1, '^SELECT .* FOR UPDATE', <writer_hg>, 1); \
      LOAD MYSQL QUERY RULES TO RUNTIME; SAVE MYSQL QUERY RULES TO DISK;"

Verify the fix

After applying changes, verify that writes now route to the writer hostgroup:

# Check that write digests now appear in the writer hostgroup
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT hostgroup, digest_text, count_star, last_seen \
      FROM stats_mysql_query_digest \
      WHERE digest_text LIKE 'INSERT%' OR digest_text LIKE 'UPDATE%' OR digest_text LIKE 'DELETE%' \
      ORDER BY last_seen DESC LIMIT 20;"

If stats_mysql_query_digest was reset by a rule reload, wait for new traffic to populate it. Alternatively, run a test write query through ProxySQL and check its hostgroup assignment.

Confirm no new 1290 errors appear:

# Confirm error 1290 has stopped accumulating
mysql -u admin -padmin -h 127.0.0.1 -P 6032 \
  -e "SELECT count_star, last_seen FROM stats_mysql_errors WHERE errno=1290;"

count_star should stop increasing after the fix is live.

Prevention

  • Always set apply=1 on terminal routing rules. Without it, a later rule can silently override the destination hostgroup. This is the single most common cause of routing bugs that pass review.
  • Route by write type, not by read type. Pattern rules around INSERT/UPDATE/DELETE/DDL routing to the writer, with reads as the catch-all. This avoids the fragility of enumerating every SELECT variant that should go to the writer.
  • Test rule changes against production digests. Before deploying a new rule, check stats_mysql_query_digest to understand which queries it will match. A rule that looks correct in isolation can shadow existing rules in production.
  • Audit rule_id ordering after any rule addition. Verify a new rule does not sit before an existing rule that handles the same traffic.
  • Persist changes to disk. After LOAD MYSQL QUERY RULES TO RUNTIME, always run SAVE MYSQL QUERY RULES TO DISK. A restart without the save reverts your fix silently.
  • Monitor stats_mysql_query_rules hit counts. A write-routing rule with zero hits is a leading indicator of a shadowed rule.
  • Set default_hostgroup to the writer hostgroup. If a query matches no rule, sending it to the writer (where it executes correctly, even if less efficient) is safer than sending it to a reader (where writes fail with 1290).

Metrics and signals to monitor

SignalWhy it mattersWarning sign
stats_mysql_errors errno=1290Direct count of read-only rejectionsAny count > 0 from reader hostgroup
stats_mysql_query_rules hits per rule_idReveals shadowed or dead rulesWrite-routing rule with 0 hits; catch-all rule with unexpectedly high volume
stats_mysql_query_digest hostgroup for write digestsShows actual routing of write statementsINSERT/UPDATE/DELETE with reader hostgroup value
MySQL_Monitor_read_only_check_OK / MySQL_Monitor_read_only_check_ERRValidates monitor can detect backend read/write rolesERR increasing means monitor cannot determine which backends are read-only

stats_mysql_errors and stats_mysql_query_rules are not collected by standard monitoring setups. They require explicit queries against the ProxySQL admin interface. Without collection, you are blind to this failure mode until applications report the error.

Monitoring with Netdata

Netdata collects the ProxySQL admin interface tables that expose this failure mode, with per-second granularity:

  • Error tracking by errno. stats_mysql_errors is collected with per-errno breakdown, so error 1290 surfaces immediately. This matters when writer_is_also_reader causes intermittent failures.
  • Rule hit distribution. stats_mysql_query_rules hit counts are tracked continuously, making it visible the moment a write-routing rule stops matching after a rule chain change.
  • Digest hostgroup assignment. stats_mysql_query_digest data shows which hostgroup each query type lands on, making it straightforward to spot writes routed to reader hostgroups.
  • Monitor check correlation. Read-only check results are collected alongside backend status transitions, so you can correlate monitor health with routing errors.
  • Change correlation. Timeline correlation between ProxySQL rule reloads and error count changes helps pinpoint when a misconfiguration was introduced.