How to Monitor Your Fly.io Application with Vigilmon
Fly.io is a popular platform for deploying containers close to your users. It handles networking, TLS, and deployment — but you still need to monitor whether your app is actually up and responding. Here's how to set up production monitoring for your Fly.io app with Vigilmon.
What Fly.io Provides vs. What You Still Need
Fly.io gives you:
- Automatic TLS certificates (via Let's Encrypt)
- Health checks for instance restart (but not external alerting)
- Deployment rollouts
- Multi-region deployment
What Fly.io does NOT give you:
- External uptime monitoring with alerts — if your app crashes and restarts slowly, users experience downtime; Fly's internal health checks restart the machine but don't alert your team
- Response time tracking across regions
- SSL expiry warnings (Let's Encrypt auto-renews but can fail)
- Heartbeat monitoring for background jobs
- Incident history for SLA reporting
Vigilmon fills these gaps.
Step 1: Add a Health Endpoint
Fly.io already uses health checks for traffic routing. Make a public endpoint that Vigilmon can check:
Go:
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("OK"))
})
Node.js:
app.get('/health', (req, res) => res.json({ status: 'ok' }));
Python (FastAPI):
@app.get("/health")
def health():
return {"status": "ok"}
Rust (Axum):
async fn health() -> &'static str { "OK" }
Step 2: Configure Fly Health Checks (fly.toml)
For Fly.io's own traffic routing, make sure your fly.toml has health checks configured:
[[services.http_checks]]
interval = "10s"
timeout = "2s"
grace_period = "5s"
method = "GET"
path = "/health"
protocol = "http"
tls_skip_verify = false
This tells Fly to route traffic away from unhealthy instances. But it doesn't alert your team — that's Vigilmon's job.
Step 3: Set Up Vigilmon
- Create an account at vigilmon.online
- Click New Monitor → HTTP Monitor
- URL:
https://yourapp.fly.dev/health(or your custom domain) - Check interval: 1 minute
- Expected Status:
200 - Add alert channels (email, Slack, PagerDuty)
- Save
Step 4: SSL Certificate Monitoring
Fly.io auto-renews Let's Encrypt certs, but renewals can fail. Add SSL monitoring as a safety net:
- New Monitor → SSL Certificate
- Domain:
yourapp.fly.dev(or your custom domain) - Alert threshold: 30 days before expiry
Let's Encrypt certificates expire every 90 days. If auto-renewal fails, you'll know 30 days early.
Step 5: Monitor Fly Machines (Multi-Region)
If you run Fly.io machines in multiple regions (e.g., iad, lhr, sin), Vigilmon's multi-region monitoring catches regional problems:
- Your
iadmachine is up butlhris down - A specific Fly region has network issues
- One machine is restarting due to crashes
Vigilmon checks from multiple locations simultaneously — if your EU users can't reach lhr but US users are fine, you'll know immediately.
Step 6: Heartbeat Monitoring for Fly Workers
If you run background workers on Fly.io (Fly Machines in worker mode, cron jobs via Fly's scheduler), add heartbeat monitors:
In Vigilmon, create a Heartbeat Monitor and get a ping URL. In your worker:
Go:
func runJob() {
// ... job logic ...
// Ping Vigilmon
http.Get("https://vigilmon.online/ping/your-heartbeat-id")
}
Node.js:
async function runJob() {
// ... job logic ...
await fetch('https://vigilmon.online/ping/your-heartbeat-id');
}
Step 7: Monitor Your Fly Postgres Cluster
If you use Fly Postgres, add a monitor that checks your app's database-dependent endpoint:
GET https://yourapp.fly.dev/api/status
Expected: 200 with {"database":"ok"}
If your Fly Postgres cluster has issues, this catches it via your app's database health check.
Fly.io Failure Modes
| Failure | Vigilmon Detects? |
|---|---|
| Machine crash / OOM | Yes — HTTP check fails during restart |
| Fly platform incident | Yes — checks from outside Fly's network |
| SSL renewal failure | Yes — SSL monitor alerts early |
| Worker job stopped | Yes — heartbeat monitor |
| Regional network issue | Yes — multi-region checks |
| Bad deploy (500 errors) | Yes — immediate HTTP check failure |
| Fly Postgres down | Yes — app's DB health endpoint |
Fly.io Deployment Monitoring
After deploying with fly deploy, verify your Vigilmon dashboard shows green. A common pattern:
fly deploy
# Wait for deploy to finish
curl -s https://yourapp.fly.dev/health
# Verify in Vigilmon dashboard
Vigilmon's incident history also lets you correlate incidents with deployment times.
Summary
Fly.io is a great platform, but you still need external monitoring:
- Add
/healthendpoint to your app - Create HTTP monitor in Vigilmon
- Add SSL certificate monitor
- Add heartbeat monitors for background workers
- Configure team alerts
Vigilmon catches what Fly.io's internal health checks can't: real user-facing downtime, regional issues, and certificate problems.
Monitor your Fly.io application with Vigilmon — free to start.
Top comments (0)