Your app is down. Your users can't reach it. You find out two hours later — not from a monitoring alert, but from an email that starts with "Hey, is your site broken?"
Sound familiar? Uptime monitoring isn't optional for production apps — it's the difference between catching an outage in seconds and discovering it from a frustrated user. Whether you're running a solo side project or a startup, you need to know the moment something goes wrong.
This tutorial walks you through setting up full uptime monitoring for a Laravel app using Vigilmon — a monitoring tool we built, ironically, with Laravel itself.
What Vigilmon Offers (Free Tier)
Before we dive in, here's what you get on the free plan:
- HTTP/HTTPS uptime checks — monitor any URL on intervals as short as 1 minute
- SSL certificate expiry monitoring — get alerted before your cert expires and breaks HTTPS
- Heartbeat monitoring — verify that your Laravel scheduler (or any cron job) is running on time
- Slack, Discord, and email alerts — instant notifications when something goes down
- Public status pages — share a live status URL with your users
- REST API — create and manage monitors programmatically
No credit card required. Let's get started.
Step 1: Sign Up at vigilmon.online
Head to vigilmon.online and create a free account. The sign-up takes under a minute — just email and password, no billing details needed.
Once you're in, you'll land on your dashboard. It's empty for now, but that won't last long.
Step 2: Add Your First HTTP Monitor
Click "Add Monitor" and select HTTP/HTTPS. Fill in:
-
Name: something descriptive, like
My App – Homepage -
URL: your app's URL, e.g.
https://myapp.com - Check interval: every 1 or 5 minutes
-
Expected status code:
200
For Laravel apps with a health check endpoint, use that instead of the homepage — it's a lighter-weight check and more reliable:
URL: https://myapp.com/health
Expected content: "ok"
If you don't have a /health route yet, add one quickly in routes/web.php:
Route::get('/health', function () {
return response()->json(['status' => 'ok']);
});
Vigilmon can assert on the response body too — so returning {"status":"ok"} lets you configure an expected content match of "ok". If a deploy breaks your app and the health endpoint returns a 500 or an error page, you'll know within minutes.
Hit Save, and Vigilmon starts checking immediately. Your first monitor is live.
Step 3: Add a Heartbeat Monitor for Your Laravel Scheduler
HTTP monitors tell you if your web server is responding. But they won't tell you if your Laravel scheduler has silently stopped running — which is exactly the kind of failure that slips through.
Heartbeat monitoring solves this: Vigilmon gives you a unique URL to ping after each scheduler run. If it doesn't receive a ping within the expected window, it fires an alert.
In your Vigilmon dashboard, click "Add Monitor" → Heartbeat. Configure:
-
Name:
Laravel Scheduler - Expected interval: every 1 minute (or whatever your scheduler runs at)
- Grace period: 2–3 minutes (time allowed before declaring it missed)
Vigilmon generates a heartbeat URL like:
https://vigilmon.online/heartbeat/abc123xyz
Now wire that into your Laravel scheduler. The cleanest approach is a dedicated Artisan command:
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Http;
class PingVigilmonHeartbeat extends Command
{
protected $signature = 'vigilmon:heartbeat';
protected $description = 'Ping Vigilmon heartbeat to confirm scheduler is running';
public function handle(): void
{
Http::get(config('services.vigilmon.heartbeat_url'));
}
}
Add the URL to your config/services.php:
'vigilmon' => [
'heartbeat_url' => env('VIGILMON_HEARTBEAT_URL'),
],
And in your .env:
VIGILMON_HEARTBEAT_URL=https://vigilmon.online/heartbeat/abc123xyz
Finally, register it in routes/console.php (Laravel 11+) to run every minute, after your other scheduled jobs:
use Illuminate\Support\Facades\Schedule;
Schedule::command('vigilmon:heartbeat')->everyMinute();
Or in app/Console/Kernel.php for older Laravel versions:
protected function schedule(Schedule $schedule): void
{
// ... your other scheduled tasks ...
$schedule->command('vigilmon:heartbeat')->everyMinute();
}
Now every time php artisan schedule:run fires and completes, Vigilmon gets a ping. If your scheduler stops — because of a server issue, a misconfigured cron job, or a deploy that never restarted the container — Vigilmon will notice within 2–3 minutes and alert you.
Step 4: Set Up Slack and Email Notifications
In your Vigilmon dashboard, go to Settings → Notifications. You can configure:
Email alerts: your email is already set from sign-up. You'll get a message the moment a monitor goes down and another when it recovers.
Slack: paste your Slack webhook URL. Vigilmon posts to your chosen channel immediately on state change.
Discord: same flow — paste your Discord webhook URL under the Discord integration.
You can attach notification channels per-monitor, so you can route your scheduler heartbeat to #ops and your public homepage monitor to #alerts.
Step 5: Share Your Status Page with Users
Every Vigilmon account gets a public status page. Go to Status Page in the dashboard, choose which monitors to display publicly, and enable it.
You'll get a URL like:
https://status.vigilmon.online/yourapp
Share this with your users — add a link in your app footer, your support docs, or your README. When your app is down, users can check the status page themselves instead of flooding your inbox with "is it down?" emails.
Bonus: Create Monitors via the REST API
If you want to automate monitor creation as part of your deploy pipeline, Vigilmon has a REST API. Here's how to create an HTTP monitor with curl:
curl -X POST https://vigilmon.online/api/v1/monitors \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My App – API",
"type": "http",
"url": "https://myapp.com/api/health",
"interval": 60,
"expectedStatusCode": 200,
"expectedContent": "ok"
}'
Your API token lives under Settings → API. This is handy for staging environments — create a monitor when a preview deploy spins up, delete it when the PR is merged.
Why We Built Vigilmon
We built Vigilmon because we kept running into the same problem with our own Laravel projects: monitoring was either expensive (services charging $30+/month for basic uptime checks) or painful to set up (self-hosted solutions that need their own infrastructure to keep running).
Since we were already deep in the Laravel ecosystem, we built what we actually wanted — something simple, fast to set up, with a free tier that's genuinely useful for real projects. Vigilmon itself runs on Laravel and MySQL, deployed on a bare Linux VPS. We monitor it with itself.
If you build things with Laravel, we built this for you. Sign up free at vigilmon.online — no credit card, no 14-day trial cliff. Just monitoring that works.
Have questions or feedback? Drop us a note at hello@vigilmon.online.
Top comments (0)