Dasha is an open source performance dashboard for PostgreSQL fleets. It 
connects to your clusters with a read-only role, shows what the databases are 
doing right now, and explains what to do about it. Nothing is installed on the 
database hosts: no agent, and no extension beyond the ones you already have.

One instance serves many clusters and all of their replicas. Most PostgreSQL 
statistics are per-instance and are not replicated, so Dasha reads every host 
of a cluster and reasons over the combined picture. An index that looks unused 
on the primary may be serving the entire read workload on a standby.

### New since the last announcement

* **Patroni clusters from etcd v3 or Consul.** Dasha reads the keys Patroni 
keeps in its DCS and turns every Patroni scope into a cluster: the members 
become hosts and the databases are listed from PostgreSQL. New clusters, lost 
replicas, created and dropped databases show up within the refresh interval. 
The DCS is only read, never written. User, password, port and database filters 
can be overridden per scope, and TLS with client certificates is supported for 
both etcd and Consul. Member names appear in the host selector next to the 
address.
* **Standby cluster links.** A Patroni standby cluster shows the cluster it 
replicates from, and the primary shows its standbys, on the Summary and 
Replication pages. Clusters are matched by the PostgreSQL system identifier, so 
a standby behind a VIP is found too.
* **Activity & Waits** (PostgreSQL 14+). A live chart of active sessions by 
class: CPU, wait event type (`IO`, `Lock`, `LWLock`, ...) and idle in 
transaction, sampled from `pg_stat_activity` every 1-10 seconds. Below it are 
the top statements, sessions, databases, users, applications and wait events; a 
click on a value adds a filter, and a statement links to its query report and 
the lock tree. Statements are grouped by `query_id`. No extension is needed, 
and each Dasha instance reads a host's `pg_stat_activity` at most once per 
second however many people watch the page.
* **Replication slot invalidation forecast.** Dasha measures the WAL rate over 
a chosen window (30 seconds to 5 minutes) and shows, for every slot, the WAL it 
retains, the remaining `max_slot_wal_keep_size` reserve and the time until the 
slot is lost. The measurement takes two LSN samples by the server clock and 
holds no connection in between.
* **COPY progress** (PostgreSQL 14+). Table, source type, bytes and rows 
processed, rows excluded and skipped, and a percentage with ETA when the total 
is known: the file size for `COPY FROM` a server-side file, the row estimate 
for `COPY TO`.
* **Health Score from the stock exporters.** The time-series mode of the Health 
Score now works with plain `postgres_exporter`, `node_exporter` and 
`pgbouncer_exporter`, so an existing Prometheus or VictoriaMetrics setup is 
enough. Metrics of Patroni clusters are mapped automatically by scope and 
member name.
* **Cold tables are not penalized.** Tables with no writes for longer than an 
inactivity threshold (7 days by default) no longer lower the score for dead 
rows and missing vacuum. A separate recommendation lists those that need a 
single `VACUUM (FREEZE, ANALYZE)`, and the Maintenance page can filter all, 
active or cold tables.

### Features

* **Health Score:** a composite 0-100 score per instance across eight 
categories, with prioritized recommendations tied to a specific database. 
Optionally computed from Prometheus/VictoriaMetrics time series, with a trend 
and a seasonal baseline.
* **Query analysis:** top queries by execution time and WAL, running and 
blocked queries with wait events, and `pg_stat_statements` snapshots. Snapshots 
can be saved to a storage database, shared by URL, and diffed against another 
snapshot or against live data.
* **Index advisor and analysis:** missing B-tree indexes proposed from 
`pg_stat_statements` of every host, optionally backed by `auto_explain` plans 
from the log. Bloat, duplicates, invalid indexes, and an answer to "may I drop 
this index?" that accounts for statistics resets, per-host counters and 
partitioned indexes rather than trusting `idx_scan = 0`.
* **Schema checks:** 17 checks for structural defects, such as sequences close 
to exhaustion, tables without a primary key or a `public` schema anyone can 
create objects in, each with a severity and remediation SQL.
* **I/O analysis** built on `pg_stat_io` (PostgreSQL 16+), with WAL on 
PostgreSQL 18.
* **Log insights:** log search in OpenSearch, Elasticsearch, VictoriaLogs and 
Yandex Managed PostgreSQL, event categories, `auto_explain` plan trees with 
findings, and plan regressions between two time windows.
* **Automatic snapshots:** a separate daemon captures query and instance-wide 
lock-contention snapshots on activity spikes or primary/replica role changes. 
The evidence is there the next morning when someone asks what happened at 03:00.
* **Tables and maintenance:** size with a TOAST breakdown, per-table describe, 
and autovacuum and wraparound thresholds computed with PostgreSQL's own 
formula. Also progress of VACUUM, ANALYZE, CREATE INDEX, CLUSTER, base backups 
and COPY, and hot tables and indexes derived from scheduled delta snapshots.
* **Cluster discovery:** a static list, Patroni clusters from etcd or Consul, 
or Yandex Managed Service for PostgreSQL; databases are discovered from the 
cluster itself.
* **Access control:** three auth modes (open, static API keys, or OIDC with 
encrypted session cookies), Casbin RBAC, personal access tokens and 
per-identity rate limiting.
* **MCP connector:** a read-only MCP server that gives AI assistants the fleet 
diagnostics. It has 35 tools, including index recommendations, schema checks, 
I/O, log search, plan regressions and live activity sampling. It also has 5 
prompts, per-user token passthrough and an embedded knowledge base of the 
scoring rules.

The interface is available in English, Russian and German.

### Requirements

* PostgreSQL 14 or newer (tested on 14-19b) for the monitored clusters, 
reachable with a role holding `pg_monitor` and `CONNECT` on every monitored 
database.
* `pg_stat_statements` (or `pgpro_stats` on Postgres Pro) for query statistics; 
`pgstattuple` is optional.
* Activity & Waits needs `compute_query_id` set to `on`, or to `auto` with 
`pg_stat_statements` or `pgpro_stats` preloaded.
* The I/O page requires PostgreSQL 16 or newer.
* Optional: etcd v3 or Consul read access for Patroni discovery.
* Optional: a log source (OpenSearch, Elasticsearch, VictoriaLogs or Yandex 
Managed PostgreSQL) for log search and plan insights, with `auto_explain` 
enabled for plan analysis.
* Optional: a separate PostgreSQL database for snapshots, hot-object history 
and personal access tokens. Everything else works without it.

### Documentation

* [README](https://github.com/dbulashev/dasha#readme): configuration, 
monitoring role privileges, deployment, Helm values
* [Patroni 
discovery](https://github.com/dbulashev/dasha/blob/main/doc/en/configuration.md#patroni-clusters-from-etcd-or-consul-optional)
* [Health Score scoring 
model](https://github.com/dbulashev/dasha/blob/main/README-health-score.md)
* [Changelog](https://github.com/dbulashev/dasha/blob/main/CHANGELOG.md)

### License

Dasha is licensed under the GNU General Public License v3.0; see 
[LICENSE](https://github.com/dbulashev/dasha/blob/main/LICENSE).

Project page: [github.com/dbulashev/dasha](https://github.com/dbulashev/dasha)

Reply via email to