Nitro is the powerful server engine behind Nuxt 3, and it can be deployed to virtually any hosting provider — Vercel, Cloudflare Workers, Netlify, Node.js, and more. Its portability is a huge strength, but it also means your monitoring strategy needs to work regardless of where Nitro runs.
This guide shows you how to set up uptime and performance monitoring for any Nitro-powered application using Vigilmon.
Why Monitor a Nitro Application?
Nitro applications handle server-side rendering, API routes, and edge functions. A silent failure in any of these layers means broken pages, missing data, or failed user interactions — with no alert unless you're watching.
Common failure scenarios:
- Deployment breaks the
/api/*routes without touching the frontend - A cold-start latency spike on Cloudflare Workers goes undetected
- SSL certificate expires on a custom domain attached to your Nitro server
- A background job endpoint stops responding after a config change
Step 1: Identify Your Nitro Endpoints to Monitor
For a Nitro application, focus on:
- The main app URL — your homepage or primary entry point
-
API health endpoint — e.g.,
/api/healthif you have one - Critical API routes — endpoints your frontend depends on
-
Custom server routes — any Nitro server routes in
/server/routes/
Step 2: Add a Health Endpoint to Your Nitro App
Create a simple health check endpoint in /server/routes/health.get.ts:
export default defineEventHandler(() => {
return {
status: 'ok',
timestamp: new Date().toISOString(),
service: 'nitro-app'
}
})
This gives Vigilmon a lightweight, dependency-free endpoint to ping. For a more thorough check, include database or upstream connectivity:
export default defineEventHandler(async () => {
// Check database or external dependency
const dbOk = await checkDatabaseConnection()
return {
status: dbOk ? 'ok' : 'degraded',
db: dbOk,
timestamp: new Date().toISOString()
}
})
Step 3: Set Up Monitoring in Vigilmon
- Sign up at vigilmon.online (free tier available)
- Click Add Monitor
- Configure:
-
URL: your Nitro app URL or
/api/healthendpoint - Check interval: 1 or 5 minutes
- Alert threshold: 2 consecutive failures before alerting
- Expected status: 200
-
URL: your Nitro app URL or
- Add your alert channels (email, webhook, Slack)
Repeat for each critical endpoint.
Step 4: Monitor Multiple Deployment Targets
If you deploy Nitro to multiple environments (preview, staging, production), add a separate monitor for each:
-
https://your-app.vercel.app/api/health(preview) -
https://staging.your-app.com/api/health(staging) -
https://your-app.com/api/health(production)
This catches regressions in preview deployments before they reach production.
Step 5: Enable SSL Monitoring
Nitro apps on custom domains need SSL monitoring. In Vigilmon:
- Open your monitor settings
- Enable SSL certificate monitoring
- Set alert threshold to 14 days before expiry
This prevents the most common cause of production outages — expired certificates.
Handling Nitro Presets
Different Nitro presets affect how your app responds:
- Node.js: Standard HTTP responses, full monitoring works as expected
- Cloudflare Workers: Watch for cold-start latency; set a higher timeout (e.g., 10s)
- Netlify / Vercel: Function timeouts may affect health checks; keep health endpoints lightweight
- Static: For static Nitro exports, monitor the CDN URL and any separate API layer
Recommended Monitoring Setup for Nitro
| Monitor | URL | Interval | Alert After |
|---|---|---|---|
| Main app | https://your-app.com |
5 min | 2 failures |
| Health endpoint | https://your-app.com/api/health |
1 min | 1 failure |
| Critical API route | https://your-app.com/api/[route] |
5 min | 2 failures |
| SSL certificate | https://your-app.com |
Daily | 14 days before expiry |
Summary
Nitro's deployment flexibility is an asset, but it requires a monitoring setup that follows your app wherever it runs. With Vigilmon, you get uptime checks, SSL monitoring, and alerting in minutes — no infrastructure setup required.
Start monitoring your Nitro app today at vigilmon.online.
Top comments (0)