Monitor
betterdb-inc/monitor · 1.1k stars · TypeScript
MCP server Real-time monitoring, slowlog analysis, and audit trails for Valkey and Redis
Install
docker run -d --name betterdb -p 3001:3001 betterdb/monitor:latestThese repos do not share one command. When an entry shows a command, it was copied as published. Check the repo's README before you run it.
Files
BetterDB Monitor
The monitoring layer that Valkey deserves.
BetterDB persists what Valkey throws away - slowlogs, command patterns, client activity, anomaly signals - so you can debug what happened at 3am, not just what's happening now. Built for Valkey 8.x with native support for COMMANDLOG, CLUSTER SLOT-STATS, and per-thread I/O metrics. Redis 6+ compatible for everything else.
Website | Docker Hub | npm | Documentation | Blog
BetterDB is built by BetterDB Inc., a public benefit company operating under the OCV Open Charter.
Quick Start (Docker)
docker run -d --name betterdb -p 3001:3001 betterdb/monitor:latest
Point your browser to http://localhost:3001. To monitor a specific instance:
docker run -d \
--name betterdb \
-p 3001:3001 \
-e DB_HOST=your-valkey-host \
-e DB_PORT=6379 \
-e DB_PASSWORD=your-password \
betterdb/monitor:latest
Connecting to a database on your host machine? Inside the container
localhostis the container itself, not your host — so usehost.docker.internalas the database host. On Docker Desktop (macOS/Windows) it works out of the box; on Linux add--add-host=host.docker.internal:host-gatewayto thedocker runcommand so the name resolves. The dashboard's one-click "connect to local instance" button auto-detects this and pre-fills the right host for you.
Two image variants are published, both multi-arch (linux/amd64, linux/arm64):
See Docker Production Deployment for persistent storage, custom ports, licensing, and air-gapped setups.
Quick Start (Kubernetes / Helm)
helm repo add betterdb https://docs.betterdb.com/charts
helm repo update
helm install betterdb-monitor betterdb/betterdb-monitor \
--namespace betterdb --create-namespace \
--set db.host=my-valkey.default.svc.cluster.local \
--set db.password=yourpassword
Then kubectl port-forward -n betterdb svc/betterdb-monitor 3001:3001 and open http://localhost:3001, or enable the chart's ingress. PostgreSQL-backed history, bring-your-own Secrets, and air-gapped licensing are all covered in the Kubernetes guide and the chart README.
Quick Start (CLI)
Run BetterDB Monitor without Docker:
npx @betterdb/monitor
On first run, an interactive setup wizard guides you through database connection, storage backend (SQLite, PostgreSQL, or in-memory), and server settings. Configuration is saved to ~/.betterdb/config.json.
npm install -g @betterdb/monitor # global install
betterdb --setup # re-run setup wizard
betterdb --port 8080 # override server port
betterdb --db-host 1.2.3.4 # override database host
betterdb --help # all options
Requires Node.js >= 20.0.0 and a Valkey or Redis instance to monitor. For SQLite storage, also npm install -g better-sqlite3.
What You Get
See everything, keep everything
- Historical analytics - query slowlogs, command patterns, client activity, and latency across any time range. The data that used to disappear after a log rotation.
- COMMANDLOG support - Valkey 8.1+ exclusive. Large requests and large replies, not just the slow ones.
- MONITOR capture sessions - record real traffic on demand: live tail, filter, replay, export to JSON/CSV, and cross-reference against connection history.
- Hot key tracking - top keys by access frequency with rank movement over time. Key Analytics (Pro, free in early access) adds type, TTL, and size distributions from live sampling.
- Cluster visibility - topology graphs, SLOT-STATS heatmaps, per-slot CPU and key distribution.
- Cluster auto-registration - a cluster connection can auto-register every node as its own monitored connection, kept in sync as the cluster scales. See docs/cluster-auto-registration.md.
- CPU & I/O thread metrics - per-thread visibility that no Redis tool can provide.
- Client analytics - see exactly which service is responsible for what, attributed by client name and pattern.
- ACL audit trail - track who accessed what, persisted for compliance and post-incident debugging.
Understand and act
- Anomaly detection (Pro, free in early access) - automatic baseline learning with correlated events and plain-English diagnoses. 20+ detectors, no manual thresholds.
- Capacity forecasting - projected time-to-ceiling for memory, ops/sec, CPU, and fragmentation.
- Webhooks - HMAC-signed alert deliveries with retries and a full delivery log.
- Live migration - move between Redis and Valkey with a three-phase analysis, execution, and validation workflow.
Built for the AI era
- Vector search observability - FT.SEARCH ops/sec and latency with per-index health for valkey-search and RediSearch. See docs/vector-ai.
- Inference latency - p50/p95/p99 per index, with SLA breach alerts (Pro, free in early access).
- Semantic cache intelligence (Pro, free in early access) - hit-rate health, similarity-threshold recommendations, and an approve/reject proposal workflow. Agent memory observability included.
- AI traces - OTLP span waterfalls from your AI application, correlated with the live Valkey state underneath each request. See docs/opentelemetry.md.
Plugs into everything
- MCP server - 60 tools for Claude Code, Cursor, or any MCP client via
@betterdb/mcp. - Prometheus endpoint - 100+
betterdb_*metrics. See docs/prometheus-metrics.md. - OpenTelemetry - ingest OTLP traces, and mirror metrics and events to any OTLP backend. See docs/opentelemetry.md.
- REST API - everything in the UI is an API call, documented via OpenAPI.
Access Your Data Your Way
Note: In production builds (Docker, CLI) API routes are served under the
/apiprefix. In local development (pnpm dev) there is no prefix - e.g.http://localhost:3001/health.
Supported Databases
The backend uses a unified adapter over the wire-compatible iovalkey client and auto-detects Valkey vs Redis from the INFO response (DB_TYPE=auto). Capabilities like COMMANDLOG and SLOT-STATS are detected per version, and the UI gracefully degrades when a feature isn't available.
Managed services are supported too - guides for AWS ElastiCache, MemoryDB, Redis Cloud, and Upstash live in docs/providers, and @betterdb/agent reaches VPC-only instances over an outbound WebSocket.
Docker Production Deployment
The Docker image contains the monitoring application (backend + frontend). It requires:
- A Valkey/Redis instance to monitor
- A PostgreSQL instance for data persistence (or use memory storage)
Run with PostgreSQL Storage
docker run -d \
--name betterdb-monitor \
-p 3001:3001 \
-e DB_HOST=your-valkey-host \
-e DB_PORT=6379 \
-e DB_PASSWORD=your-password \
-e STORAGE_TYPE=postgres \
-e STORAGE_URL=postgresql://user:pass@postgres-host:5432/dbname \
betterdb/monitor
Run on Custom Port
Facts
- Kind
- MCP server
- Repo
- betterdb-inc/monitor
- Group
- Uncategorized
- Stars
- 1.1k
- Language
- TypeScript
- Last push
- 2026-10-09
- Forks
- 82
- Homepage
- betterdb.com
- Topics
- dragonfly, mcp, mcp-server, metrics, monitoring, observability, opentelemetry, prometheus, redis, valkey
- 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
- 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
- 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
- 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
- 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k