Mautic is the backbone of your marketing operations — email campaigns, contact scoring, lead nurturing, and form handling all run through it. But Mautic's engine depends heavily on cron jobs: if your system cron stops running, no emails go out, no contacts get scored, and campaigns silently stall. Vigilmon monitors both the Mautic web UI and your cron job heartbeats, alerting you before a silent failure turns into a missed campaign launch.
What You'll Set Up
- Vigilmon HTTP monitor for the Mautic web UI
- A health endpoint check confirming PHP and the database are responding
- A cron job heartbeat monitor to verify Mautic's scheduled tasks are running
- SSL certificate expiry alerts
Prerequisites
- A self-hosted Mautic instance (version 4.x or 5.x)
- A free Vigilmon account
- Shell access to the server running Mautic
Why Mautic Needs More Than Basic Uptime Monitoring
A standard HTTP uptime check tells you whether Mautic's login page loads. But Mautic's most critical work happens in the background: mautic:emails:send, mautic:campaigns:trigger, and mautic:segments:update are all driven by cron. If cron stops — because of a permissions change, a misconfigured system scheduler, or a PHP-FPM timeout — Mautic's web UI keeps returning 200 while email delivery silently grinds to a halt.
Vigilmon's heartbeat monitors solve this by expecting a regular ping from your cron jobs. If the ping stops arriving on schedule, Vigilmon alerts you.
Step 1: Monitor the Mautic Web UI
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Mautic URL — typically
https://mautic.yourdomain.com. - Set Check interval to
1 minute. - Set Expected status code to
200. - Click Save.
This catches reverse proxy failures, PHP-FPM crashes, and database connection errors that prevent the Mautic login page from loading.
Step 2: Add a Health Endpoint Check
Mautic doesn't ship a dedicated health endpoint, but the Mautic API confirms that PHP and the database are healthy. If you've enabled Mautic's API (Settings → API Settings → Enable HTTP Basic Auth), probe it directly:
- In Vigilmon, click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter
https://mautic.yourdomain.com/api/. - Set Expected status code to
200or401— either means Mautic and the database are responding (401 just means the request is unauthenticated). - Set Name to
Mautic – API. - Click Save.
Alternatively, create a lightweight PHP health script at a path your web server serves:
<?php
// /var/www/mautic/health.php
header('Content-Type: application/json');
$checks = [];
$status = 'ok';
// Check database
$host = getenv('MAUTIC_DB_HOST') ?: 'localhost';
$name = getenv('MAUTIC_DB_NAME') ?: 'mautic';
$user = getenv('MAUTIC_DB_USER') ?: 'mautic';
$pass = getenv('MAUTIC_DB_PASSWORD') ?: '';
try {
$pdo = new PDO("mysql:host=$host;dbname=$name", $user, $pass, [
PDO::ATTR_TIMEOUT => 3,
]);
$pdo->query('SELECT 1');
$checks['database'] = 'ok';
} catch (Exception $e) {
$checks['database'] = 'error';
$status = 'degraded';
}
$code = $status === 'ok' ? 200 : 503;
http_response_code($code);
echo json_encode(['status' => $status, 'checks' => $checks]);
Visit https://mautic.yourdomain.com/health.php to confirm the output, then add a Vigilmon monitor pointing to it with Expected body contains set to "status":"ok".
Step 3: Set Up Cron Job Heartbeat Monitoring
This is the most important step for Mautic. Mautic's recommended cron schedule looks like this on a standard Linux server:
*/5 * * * * php /var/www/mautic/bin/console mautic:emails:send
*/15 * * * * php /var/www/mautic/bin/console mautic:campaigns:trigger
*/15 * * * * php /var/www/mautic/bin/console mautic:segments:update
*/30 * * * * php /var/www/mautic/bin/console mautic:import
Wrap the most critical job (mautic:emails:send) with a Vigilmon heartbeat ping:
Create the Heartbeat Monitor
- In Vigilmon, click Add Monitor → Heartbeat / Cron.
- Set Name to
Mautic – Email Cron. - Set Expected interval to
10 minutes(safe buffer above the 5-minute schedule). - Click Save — Vigilmon generates a unique heartbeat URL like
https://vigilmon.online/heartbeat/abc123.
Update Your Cron Job
*/5 * * * * php /var/www/mautic/bin/console mautic:emails:send && curl -fsS --retry 3 https://vigilmon.online/heartbeat/abc123 > /dev/null 2>&1
The curl ping only fires when the console command exits cleanly. If mautic:emails:send crashes or times out, the ping never arrives and Vigilmon alerts you after 10 minutes of silence.
Repeat this pattern for mautic:campaigns:trigger if campaign processing is also critical, using a separate heartbeat monitor with a 30-minute window.
Step 4: Configure Response Time Alerts
Mautic's dashboard can be slow when processing large contact segments. Set a threshold so you're alerted before users complain:
- Open your primary Mautic monitor in Vigilmon.
- Find Response time threshold.
- Set Warn to
1500msand Critical to4000ms. - Save.
Step 5: Enable SSL Certificate Monitoring
An expired certificate blocks Mautic's own API calls, webhook deliveries, and form submissions — not just browser access.
- Open your Mautic web UI monitor in Vigilmon.
- Enable Alert when certificate expires within 14 days.
- Save.
Step 6: Configure Notifications
- Go to Alert Channels → Add Channel → Slack webhook (or email).
- Paste your Slack webhook URL with a payload like:
{
"text": "📧 *{{monitor_name}}* is {{status}}!\nURL: {{url}}\nTime: {{timestamp}}"
}
- Attach the channel to all your Mautic monitors.
Step 7: Verify the Full Setup
- Temporarily disable the cron job and confirm the heartbeat alert fires after the window expires.
- Re-enable cron and confirm the recovery notification arrives.
- Test the web UI monitor by pointing it at a bad path — verify the alert and recovery cycle works end-to-end.
Going Further
- Mautic webhook delivery: Add monitors for any external services Mautic sends webhooks to — CRM integrations, Zapier, or custom endpoints — so a downstream failure doesn't silently swallow your Mautic events.
- Queue depth monitoring: On high-volume Mautic installs, use a small script to expose the email queue depth as a metric and probe it via Vigilmon's API monitor.
- Staging parity: Add a second set of heartbeat monitors for your Mautic staging environment so scheduled-task failures surface before reaching production.
With Vigilmon monitoring both the web UI and the cron heartbeats, you'll know the moment Mautic's email engine stalls — not when your marketing team asks why the campaign didn't send.