Flarum is a modern open-source forum platform built on Laravel and Mithril.js, offering a clean single-page application experience, a RESTful JSON API, and zero jQuery dependencies. It's designed as a fresh replacement for aging forum software and is popular for community discussions and support forums. Self-hosting Flarum means you're responsible for its uptime — from the SPA shell to the API layer to the Laravel task scheduler running extension cron jobs. Vigilmon monitors all of these surfaces and alerts you before your users notice anything is wrong.
What You'll Set Up
- HTTP uptime monitor for the Flarum web UI
- REST API availability check on
/api - Discussion endpoint check on
/api/discussions - SSL certificate expiry alerts for HTTPS deployments
- Cron heartbeat for Flarum Laravel-scheduled tasks (email digests, extension cron jobs)
Prerequisites
- Flarum installed and accessible over HTTP or HTTPS
- A free Vigilmon account
Step 1: Monitor the Flarum Web UI
Flarum's homepage serves the SPA shell. If it goes down, users cannot load the forum at all.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Flarum URL:
https://forum.yourdomain.com. - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
A 200 response from the root confirms your web server is running and PHP-FPM is processing Flarum requests.
Step 2: Monitor the Flarum REST API (/api)
Flarum's own SPA frontend communicates entirely through its REST API. The /api root endpoint returns a JSON document describing available API resources and is a reliable indicator that Flarum's application layer is healthy — not just the web server.
- Add a new monitor with Type
HTTP / HTTPS. - Enter:
https://forum.yourdomain.com/api - Set Expected HTTP status to
200. - Enable Keyword check and enter
"data"(always present in the API root response). - Set Check interval to
2 minutes. - Click Save.
The keyword check ensures you're receiving a valid JSON API response, not a PHP error page that your web server forwards with a 200 status.
Step 3: Monitor the Discussions Endpoint (/api/discussions)
The /api/discussions endpoint is Flarum's primary content API — it's what the SPA calls to populate the discussion list. An error here means users see a blank forum even if the SPA shell loads correctly.
- Add a new monitor with Type
HTTP / HTTPS. - Enter:
https://forum.yourdomain.com/api/discussions - Set Expected HTTP status to
200. - Enable Keyword check and enter
"data". - Set Check interval to
5 minutes. - Click Save.
This check catches database connection failures, ORM errors, or extension conflicts that affect content retrieval but not static asset delivery.
Step 4: SSL Certificate Alerts
Flarum forums are public-facing and rely on HTTPS. A lapsed certificate turns every visitor away before they can even reach your forum.
- Open the HTTP monitor for
https://forum.yourdomain.com(created in Step 1). - Enable Monitor SSL certificate.
- Set Alert when certificate expires in less than
21 days. - Click Save.
If you run Flarum on a subdomain with a separate certificate, add a standalone SSL monitor for that domain. The 21-day alert window gives you enough time to renew before browsers display security warnings.
Step 5: Heartbeat Monitoring for Flarum Scheduled Tasks
Flarum's email notification digests and extension-driven cron jobs run through Laravel's task scheduler. These jobs produce no HTTP errors when they fail — the forum continues loading while emails go undelivered and extension maintenance tasks fall behind. Use Vigilmon's cron heartbeat to verify scheduled tasks complete on time.
Create a Heartbeat Monitor
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Give it a name like
Flarum email digest. - Set the expected ping interval to match your scheduler frequency (e.g.,
60minutes for hourly tasks). - Copy the heartbeat URL (e.g.,
https://vigilmon.online/heartbeat/abc123).
Wrap the Laravel Scheduler
The system cron entry for Flarum's Laravel scheduler typically looks like:
* * * * * cd /path/to/flarum && php flarum schedule:run >> /dev/null 2>&1
Wrap it to ping Vigilmon after each successful run:
* * * * * cd /path/to/flarum && php flarum schedule:run && curl -s https://vigilmon.online/heartbeat/abc123
The && operator ensures the ping only fires when schedule:run exits successfully. If the PHP process crashes or the scheduler exits with an error, the heartbeat is never sent and Vigilmon alerts after the expected interval.
Monitor a Specific Extension Task
For a high-value extension task (e.g., a nightly digest), create a dedicated heartbeat and ping it from the extension's scheduled command:
// In your extension's ScheduledTask command handle() method
public function handle(): void
{
$this->sendDigestEmails();
// Signal Vigilmon that this run completed
Http::get('https://vigilmon.online/heartbeat/abc123');
}
Step 6: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
- Set Consecutive failures before alert to
2on the web UI monitor — PHP-FPM restarts or Nginx reloads can cause a single transient failure. - Suppress alerts during Flarum upgrades or extension installs with a maintenance window:
curl -X POST https://vigilmon.online/api/maintenance \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"monitor_id": "abc123", "duration_minutes": 15}'
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Web UI | https://forum.yourdomain.com | Web server or PHP-FPM down |
| REST API root | /api | Laravel application failure |
| Discussions API | /api/discussions | Database errors, ORM failure |
| SSL certificate | Forum domain | Certificate expiry, renewal failure |
| Cron heartbeat | Heartbeat URL | Email digests stopped, extension tasks missed |
Flarum's SPA architecture means the homepage can load from cached assets while the API is completely broken — users see a blank discussion list with no error message. Monitoring /api and /api/discussions separately from the root URL catches exactly this failure mode before your community notices.