Basic Structure
Create TypeScript files inpongo/monitors/. Each file exports a monitor() configuration:
HTTP Health Checks
Latency Thresholds
You can mark a service as “degraded” when it’s slow but still functional:Status Page API Integration
Monitor third-party services by integrating with their status page APIs:Handler Return Values
Your monitor handler must return an object with these fields:| Field | Type | Required | Description |
|---|---|---|---|
status | "up" | "down" | "degraded" | Yes | Current service status |
responseTime | number | Yes | Response time in milliseconds |
statusCode | number | No | HTTP status code |
message | string | No | Additional context or error message |