Skip to main content
Monocle can monitor your services availability by periodically checking your health endpoints. Get notified when something goes wrong and track your uptime over time.

How It Works

Monocle pings your configured URL once per minute. By default, it simply checks if your endpoint responds with a 2xx status code. But with Health Mode enabled, Monocle goes further by parsing the response body to understand the detailed health status of your services.

Health Mode

Health Mode allows Monocle to understand what’s happening inside your application. Instead of just checking “is the server responding?”, it parses a structured health response to detect degraded services—even when the endpoint technically returns a 200 OK. For example, your API might respond successfully while your database connection is failing. With Health Mode, Monocle detects this and creates an incident.

Response Format

Your health endpoint must return a JSON response matching this structure:

AdonisJS Integration

If you’re using AdonisJS, this format is natively supported by the health checks module. Follow the AdonisJS Health Checks guide to set up your health endpoint. Once configured, your /health endpoint will automatically return the expected format and work seamlessly with Monocle’s Health Mode.

Configuring a Monitor

Navigate to the Uptime section in your dashboard and click Configure to set up your monitor.

Basic Settings

Advanced Settings

Custom Headers

If your health endpoint requires authentication, you can add custom headers:

Check Details

Click on any check in the uptime timeline to see detailed results. When Health Mode is enabled, you’ll see the status of each individual health check (database, Redis, disk space, etc.). This makes it easy to understand exactly what failed and why, without digging through logs.

Incident Thresholds

To avoid false alarms from temporary network issues, Monocle uses tolerance thresholds:
  • Failure Tolerance: An incident is only created after this many consecutive failures. Set it higher if you experience occasional network hiccups.
  • Recovery Tolerance: An incident is resolved after this many consecutive successes. Keep it at 1 for fast recovery notifications, or increase it to ensure the service is truly stable.