Track storage, connections, and per-database breakdowns
Stackwatch connects to MongoDB Atlas via the Atlas Admin API to track storage and connection usage across your clusters. Optionally, you can add a MongoDB connection string to get real-time data from M0/free-tier clusters and unlock per-database breakdowns on Pro.
Total data size across all databases, vs your tier's storage limit
Active Connections
Free + Pro
Current open connection count vs the connection limit for your cluster tier
Network In (MB/h)
Pro only
Inbound network throughput, vs a 10 GB/day reference
Network Out (MB/h)
Pro only
Outbound network throughput, same reference
CPU %
Pro only (M2+)
Average system CPU utilisation across cluster nodes
Resident Memory
Pro only (M2+)
RAM used by the mongod process across nodes
Avg Read Latency
Pro only (M2+)
Average execution time for read operations (ms)
Avg Write Latency
Pro only (M2+)
Average execution time for write operations (ms)
Disk Read IOPS
Pro only (M2+)
Disk read operations per second
Disk Write IOPS
Pro only (M2+)
Disk write operations per second
Replication Lag
Pro only (M2+ replica sets)
How far the most-lagged secondary is behind the primary (seconds)
M0 note: M0/shared clusters do not expose process measurements via the Atlas Admin API. Without a connection string, Storage and Active Connections will show as 0/limit, and performance metrics will not appear. Add a connection string (Step 4) to get real values.
In your Atlas project, go to Identity & Access → Applications → API Keys
Click Create API Key
Enter a description (e.g. Stackwatch monitoring)
Assign the Project Read Only role — Stackwatch only ever reads data
Click Next
Copy both the Public Key (short alphanumeric string) and the Private Key (shown only once — save it now)
Add your outbound IP to the access list if your Atlas project requires IP allowlisting. If you're on Vercel, you may need to allowlist 0.0.0.0/0 or use a static egress IP.
If you're on an M0/free-tier cluster, or you want per-database and per-collection breakdowns on Pro, add a MongoDB connection string. This gives Stackwatch direct read-only access via db.stats() and serverStatus.
clusterMonitor grants access to monitoring commands (serverStatus, replSetGetStatus, currentOp). readAnyDatabase adds the ability to list and inspect collections — without it, the per-collection breakdown will show "No collection data".
Status shows error with "Invalid API key"
Double-check the Public Key and Private Key (no extra spaces). Verify the key pair hasn't been deleted in Atlas → Identity & Access → Applications → API Keys.
Status shows error with "lacks required access"
The API key must have at least the Project Read Only role on the project. Org-level roles alone are not sufficient.
Status shows error with "Project ID not found"
Confirm the Project ID (24-character hex) is correct, and that the API key is assigned to that specific project.
Dashboard shows 0/512 MB after connecting (M0 cluster)
This is expected without a connection string — Atlas M0 clusters do not expose process measurements via the Admin API. Follow Step 4 above to get real values.
Per-collection breakdown shows "No collection data"
The DB user is missing the readAnyDatabase privilege. Add it as a specific privilege (Database and Collection both blank) and wait for the next poll cycle.
CPU, memory, latency, or IOPS metrics are missing
These require an M2 or higher cluster. M0 shared clusters do not expose process measurements via the Atlas Admin API.
Slow Queries metric is missing
Only available via a direct connection string. M0 clusters do not support the currentOp command.
IP allowlist errors
Both the Atlas Admin API and direct connections require the worker's IP to be allowed. Add the Railway egress IP, or set Atlas access to 0.0.0.0/0 for unrestricted access.