| name | replit-observability |
| description | Monitor Replit deployments with health checks, uptime tracking, resource usage, and alerting.
Use when setting up monitoring for Replit apps, building health dashboards,
or configuring alerting for deployment health and performance.
Trigger with phrases like "replit monitoring", "replit metrics",
"replit observability", "monitor replit", "replit alerts", "replit uptime".
|
| allowed-tools | Read, Write, Edit |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","replit","monitoring","observability","alerting"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Replit Observability
Overview
Monitor Replit deployment health, track cold starts, measure resource usage, and set up alerting. Covers Replit's built-in monitoring, external health checking, structured logging, and integration with monitoring services.
Prerequisites
- Replit app deployed (Autoscale or Reserved VM)
- Health endpoint implemented (
/health)
- External monitoring service (UptimeRobot, Better Stack, or Prometheus)
Instructions
Step 1: Health Endpoint with Detailed Metrics
import { Router } from 'express';
import { pool } from '../services/postgres';
const router = Router();
const startTime = Date.now();
router.get('/health', async (req, res) => {
const checks: Record<string, any> = {
status: 'ok',
uptime: process.uptime(),
bootTime: ((Date.now() - startTime) / 1000).toFixed(1) + 's ago',
timestamp: new Date().toISOString(),
repl: process.env.REPL_SLUG,
region: process..,
: process..,
};
(process..) {
dbStart = .();
{
pool.();
checks. = {
: ,
: .() - dbStart,
: { : pool., : pool. },
};
} (: ) {
checks. = { : , : err. };
checks. = ;
}
}
mem = process.();
checks. = {
: .(mem. / / ),
: .(mem. / / ),
: .(mem. / / ),
: ((mem. / mem.) * ).(),
};
checks. = {
: process.,
: process.,
: process.,
};
res.(checks. === ? : ).(checks);
});
router.(, res.());
router;