Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Home
  2. Guides
  3. Monitor a Laravel app's health with the Cipi Agent and any uptime service
Cipi Agent & AI

Monitor a Laravel app's health with the Cipi Agent and any uptime service

Expose a token-protected health endpoint covering database, cache, queue, storage and the last deploy, and plug it into UptimeRobot, Better Stack, Grafana or a cron.

By Updated 2 min read

Laravel's /up route says the app boots. The agent's /cipi/health says whether the app actually works: database, cache, queue, storage and the deploy.

Key ideas, in plain words#

TermMeaning
Health checkA URL that answers "OK" only when the app really works
Uptime monitorAn outside service that calls it every minute and alerts you
DegradedUp, but one dependency (queue, cache) has a problem

1. Enable the endpoint#

bash
php artisan cipi:service health --enable
php artisan cipi:generate-token health
curl -H "Authorization: Bearer $CIPI_HEALTH_TOKEN" https://shop.example.com/cipi/health
json
{
  "status": "healthy",
  "checks": {
    "database": { "ok": true, "driver": "mysql" },
    "cache": { "ok": true, "driver": "database" },
    "queue": { "ok": true, "pending_jobs": 0, "failed_jobs": 0 },
    "storage": { "ok": true, "disk_free_gb": 31.2, "disk_used_percent": 41 },
    "deploy": { "ok": true, "short_commit": "0123456", "in_progress": false }
  }
}

If the database, cache, queue or storage fails, status becomes degraded with HTTP 503, which is what uptime services watch.

2. Connect an uptime service#

ServiceSet up
Better Stack, UptimeRobot, PingdomHTTP monitor on /cipi/health, header Authorization: Bearer <token>, alert on non-200
Grafana / PrometheusBlackbox exporter with the header; parse checks.*.ok with a JSON exporter
Plain cron`curl -fsS -H "Authorization: Bearer …" https://…/cipi/health >/dev/nullnotify`

3. Combine with the server checks#

LayerWatchesAlerts via
cipi monitorCPU, memory, disk, services, certificatesYour Cipi channels
cipi healthOne URL per app, every 5 minutes and after deploys; can roll backYour Cipi channels
/cipi/healthInside the app: DB, cache, queue, storage, deployYour uptime service, from outside

The outside view catches what the server can't see about itself: DNS, network, a down server.

Troubleshooting#

ProblemFix
Always 401Missing Authorization: Bearer header in the monitor
queue not okFailed or pending jobs above threshold: check workers and queue:failed
storage not okDisk full or permissions: cipi app fix-permissions shop, check disk
Monitor flapsIncrease its timeout; the check queries the database each time

Questions

`/up` or `/cipi/health`?

/up is public and only says Laravel boots. /cipi/health needs a token and checks database, cache, queue, storage and the live release. Use /up for public status pages and /cipi/health for alerting.

Which uptime services work?

Any that can send a custom header and check the status code or a keyword: UptimeRobot, Better Stack, Pingdom, Uptime Kuma, Boogle.

Will a failing check roll back a deploy?

With a Cipi health check set and --rollback-on-unhealthy (or rollback_on_unhealthy: true in cipi.yml), yes.

What if a step fails?

Read the troubleshooting table above first. Then check the matching docs page, open a GitHub issue, or ask in the community. Most commands print the fix when they refuse something.

Do I need the web panel for this?

No. Every step works from the CLI. The optional web panel shows the same things in a browser.

Can I run these commands from my laptop?

Many of them, through cipi-cli and the API, with a scoped token. Otherwise ssh cipi@your-server and use sudo cipi ….

Will this affect other apps on the server?

No, unless the step says it's server-wide (installing a PHP version, firewall, Cloudflare tunnel). Each app has its own user, PHP pool, database and Valkey.

Try it on your own server

Free and open source. One command on a fresh Ubuntu 24.04 or 26.04 VPS.

wget -O - https://cipi.sh/setup.sh | bash
Read the quickstart