Definitions
Monitors
defineMonitor checks a URL every minute and opens an outage after two failures in a row.
definitions/monitors/acme.ts
import { defineMonitor } from 'vigie/sdk'
export const api = defineMonitor({ id: 'api', name: 'API', url: 'https://api.acme.dev/ready', expect: 200 })
export const shop = defineMonitor({ id: 'shop', name: 'Shop', url: 'https://shop.acme.dev' })
expect is an exact status. Without it, anything under 400 counts as up. Two failures in a row open an outage, and the first success closes it.
Monitors in code only run in server mode, so a laptop never probes production. Monitors can also be added on the Uptime screen.
Vigie cannot report its own host going down. Keep one check on Vigie itself from somewhere else.