For a handful of servers, the part of Datadog people look at every day fits in a weekend: a small agent that reports CPU, memory, disk and container stats, a filtered log tail, HTTP checks, a dashboard with a month of history and alerts to your phone. What doesn't fit is the rest of the product: hundreds of integrations that work out of the box, tracing requests across services, anomaly detection, and an ingest pipeline that copes with thousands of hosts. Even at small scale, running Beszel, Netdata or a Prometheus and Grafana stack is usually less work than maintaining your own agent.
Before you buildFive hosts or fewer and a day of history is enough? Datadog Free already covers that, and Grafana Cloud's free tier keeps 14 days.
Build me a small server-monitoring system to replace Datadog for a handful of machines. Requirements: - Node.js 22 + TypeScript, one repo with two parts: `agent` and `server`. - Agent: every 15 seconds collect CPU, load, memory, disk, network and the top 5 processes with the `systeminformation` package, plus Docker container stats when /var/run/docker.sock exists. Tail the log files listed in agent.yaml and forward lines that match its regexes. Buffer to disk while the server is down. - The agent posts to the server over HTTPS with a per-host token from .env. - Server: Fastify on port 4900, better-sqlite3 in ./data/metrics.db. Keep raw points for 48 hours and 1-minute rollups for 30 days; prune nightly. - Dashboard: an overview grid and one page per host, uPlot charts with 1h, 24h, 7d and 30d ranges, and log search backed by SQLite FTS5. - HTTP checks: URLs from checks.yaml requested every 60 seconds, status and latency stored. - Alert rules in alerts.yaml: metric above a threshold for N minutes, host silent for 2 minutes, check failing, log pattern seen. Notify through ntfy (topic in .env), send a recovery message, never repeat within 30 minutes. - Self-hosted, no telemetry, no accounts; the dashboard sits behind a password. - Out of scope: distributed tracing, Kubernetes autodiscovery, anomaly detection. - README: systemd units for agent and server, how to add a host, and a plain note that this is built for a few machines, not a fleet.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Datadog.
Add database checks to the monitoring agent in this folder. Requirements: - Optional Postgres collector (connection string in .env): active and idle connections, transactions per second, cache hit ratio, database sizes and the 5 slowest queries from pg_stat_statements if the extension is installed. - Optional Redis collector: memory used, connected clients, ops per second and keyspace hits and misses from INFO. - Each collector shows up as a section on the host page and can be used in alerts.yaml like any other metric. - Update the README with the read-only database role to create.
Add trace collection to the monitoring server in this folder. Requirements: - Accept OTLP over HTTP (JSON and protobuf) on /v1/traces. - Store spans for 3 days in SQLite with service, route, duration and status. - A Traces page: slowest routes per service by p95, and a waterfall view of one trace with its child spans. - Document in the README how to instrument a Node app with @opentelemetry/sdk-node and point it at this server. - Out of scope: sampling rules, metrics or logs over OTLP.
Add a Datadog dashboard importer to the monitoring server in this folder. Requirements: - A command that reads a dashboard JSON file exported from Datadog (Configure > Export dashboard JSON). - Map timeseries widgets on system.cpu, system.mem, system.disk, system.load and system.net metrics to this app's metric names, keeping titles and layout order. - Print every widget it could not map, with its query, instead of guessing. - Save the result as a custom dashboard page. - Update the README.
Add a public status page to the monitoring server in this folder. Requirements: - Serve /status on a separate port that exposes nothing else. - Show only the checks I mark public in checks.yaml, with current state and a 90-day uptime bar per check. - Let me post short incident notes from the admin dashboard; they appear on the status page with a timestamp. - A static HTML fallback is written to ./data/status.html every minute. - Update the README.
Datadog is what companies buy when they have more services than people to watch them: install one agent, switch on integrations, and dashboards and traces appear with little setup. Teams pay to avoid running their own observability stack, and once monitors, dashboards and instrumented code depend on it, leaving means rebuilding all of them.
Estimate · The agent runs on servers you already pay for, and the dashboard fits on the smallest VPS (about $5 a month) or a machine at home. Push alerts through ntfy.sh are free. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Free | $0 | $0 | Up to 5 hosts, 1-day metric retention, 5 containers per host. |
| Infrastructure Pro | $18 | $15 | 15-month metric retention, 100 custom metrics per host, dashboards and monitors. |
| Infrastructure Enterprise | $27 | $23 | Adds machine-learning alerts, Live Processes and the Governance Console. |
| Log Management | custom | — | $0.10 per GB ingested, plus indexing: $2.04 per million events with 15-day retention month-to-month ($1.70 annual, $2.55 on-demand). |
| APM | $48 | $31 | 150 GB of ingested spans and 1 million indexed spans per host a month, 15-day retention. |
Free monitors up to 5 hosts but keeps metrics for only one day.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: Hundreds of ready integrations for cloud services, databases and Kubernetes, Tracing and profiling across services (APM).
About $18 a month on the Infrastructure Pro (1 host) plan, $216 a year (checked 2026-10-13).
Hundreds of ready integrations for cloud services, databases and Kubernetes; Tracing and profiling across services (APM); Anomaly detection and forecasts on metrics; Long retention and fast search over very large log volumes; Synthetic tests, real-user monitoring and on-call tooling. If any of those matter to you, keep paying.
Yes: Beszel (open source), Netdata (open source), Grafana with Prometheus and Loki (open source).