Crater is a powerful self-hosted invoicing and billing platform built on Laravel and Vue.js. When your clients can't access their invoices, or your payment webhooks silently fail, you lose both revenue and trust. Vigilmon gives you end-to-end visibility across every layer of your Crater stack — from the web server down to the scheduled recurring invoice jobs — so billing issues surface before your clients notice them.
What You'll Set Up
- HTTP uptime monitor for the Crater web interface (port 8000)
- API health check for the Crater REST endpoints
- PDF generation service health probe
- Email delivery service monitoring for invoice dispatch
- Payment gateway webhook endpoint monitoring
- Database connectivity check via a health endpoint
- Cron heartbeat for scheduled recurring invoice jobs
Prerequisites
- Crater installed and running (typically on port 8000)
- A free Vigilmon account
Step 1: Monitor the Crater Web Interface
The Crater web application is the primary interface your clients and staff use. Any downtime here means no access to invoices, estimates, or payment history.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Crater URL:
http://your-server:8000orhttps://crater.yourdomain.com. - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
If you've configured a reverse proxy (nginx or Apache) in front of Crater, monitor the public-facing URL rather than the raw port to catch proxy failures too.
Step 2: Add a Health Endpoint to Crater
Crater's Laravel backend lets you add a custom health route in routes/api.php. This endpoint can verify that the application, database, and cache are all reachable:
// routes/api.php
Route::get('/health', function () {
$checks = [];
// Database connectivity
try {
DB::connection()->getPdo();
$checks['database'] = 'ok';
} catch (\Exception $e) {
$checks['database'] = 'error';
}
// Cache connectivity
try {
Cache::put('health_check', true, 10);
$checks['cache'] = Cache::get('health_check') ? 'ok' : 'error';
} catch (\Exception $e) {
$checks['cache'] = 'error';
}
$allOk = !in_array('error', $checks);
return response()->json([
'status' => $allOk ? 'ok' : 'degraded',
'checks' => $checks,
], $allOk ? 200 : 503);
});
Deploy this change, then add a monitor in Vigilmon pointing to:
https://crater.yourdomain.com/api/health
Set Expected HTTP status to 200 and check every 1 minute.
Step 3: Monitor the Crater API
Crater exposes a REST API used by its Vue.js frontend. API failures are invisible to simple homepage checks but break all invoice creation, payment recording, and client management operations.
Add a second monitor:
- URL:
https://crater.yourdomain.com/api/v1/ping(or your custom health endpoint from Step 2). - Type:
HTTP / HTTPS. - Check interval:
1 minute. - Expected status:
200.
If Crater doesn't expose a dedicated ping route, use the health endpoint from Step 2 for API monitoring as well.
Step 4: Monitor PDF Generation
Crater generates PDF invoices and estimates on demand. PDF generation typically depends on a headless browser or a server-side PDF library (wkhtmltopdf, DomPDF). A broken PDF service means clients receive empty attachments.
Add a route that exercises the PDF generation pipeline:
// routes/api.php
Route::get('/health/pdf', function () {
try {
// Trigger a minimal PDF render without saving
$pdf = PDF::loadView('app.pdf.invoice', ['test' => true]);
$output = $pdf->output();
$ok = strlen($output) > 100;
} catch (\Exception $e) {
$ok = false;
}
return response()->json(['status' => $ok ? 'ok' : 'error'], $ok ? 200 : 503);
});
Monitor /api/health/pdf in Vigilmon with a 2 minute check interval (PDF rendering is heavier than a simple ping).
Step 5: Monitor Email Delivery for Invoices
Invoice emails are how clients receive their bills. Silent SMTP failures mean clients never get notified — and you don't find out until they complain.
Add an email-connectivity health route:
// routes/api.php
Route::get('/health/mail', function () {
try {
$transport = Mail::getSymfonyTransport();
// Test SMTP connection without sending
if (method_exists($transport, 'start')) {
$transport->start();
}
return response()->json(['status' => 'ok']);
} catch (\Exception $e) {
return response()->json(['status' => 'error', 'message' => $e->getMessage()], 503);
}
});
Monitor /api/health/mail every 5 minutes — email transports don't need per-minute checks but should alert within a few minutes of a failure.
Step 6: Monitor Payment Gateway Webhook Endpoints
Payment gateways (Stripe, PayPal, Authorize.net) deliver payment confirmation events to your Crater webhook URL. If this endpoint goes down, payments are recorded at the gateway but never reflected in Crater — a serious billing discrepancy.
Crater's webhook routes typically look like:
https://crater.yourdomain.com/api/v1/webhooks/stripe
https://crater.yourdomain.com/api/v1/webhooks/paypal
These routes accept POST requests only, so a GET returns 405. Monitor them with:
- URL:
https://crater.yourdomain.com/api/v1/webhooks/stripe - Type:
HTTP / HTTPS - Expected HTTP status:
405(Method Not Allowed — proves the route exists and the server is up) - Check interval:
1 minute
A 404 means the route is gone. A 500 means the handler is crashing. Either is worth an alert.
Step 7: Set Up a Heartbeat for Scheduled Invoice Jobs
Crater relies on Laravel's task scheduler to send recurring invoice reminders, generate scheduled invoices, and process overdue notifications. If the cron daemon stops, these jobs queue silently.
Add a heartbeat monitor in Vigilmon:
- Click Add Monitor → set Type to
Cron Job / Heartbeat. - Name it
Crater Scheduler. - Set Expected ping interval to
10 minutes. - Copy the generated heartbeat URL.
Then add it to your Crater scheduler in app/Console/Kernel.php:
protected function schedule(Schedule $schedule)
{
// Existing Crater scheduled tasks
$schedule->command('invoice:recurring')->hourly();
$schedule->command('invoice:send-reminders')->dailyAt('08:00');
// Heartbeat — ping every 5 minutes to prove the scheduler is alive
$schedule->call(function () {
Http::get(env('VIGILMON_HEARTBEAT_URL_SCHEDULER'));
})->everyFiveMinutes();
}
Add VIGILMON_HEARTBEAT_URL_SCHEDULER=https://vigilmon.online/api/heartbeat/your-token to your .env file.
Step 8: Configure Alerting
With all monitors in place, configure alert channels in Vigilmon so the right person gets notified immediately:
- Go to Alert Channels and add your preferred channel (email, Slack, PagerDuty, webhook).
- For the web interface monitor: set alert threshold to 1 failure — any downtime is billable impact.
- For PDF and email health monitors: use 2 consecutive failures to avoid false positives from transient network blips.
- For the scheduler heartbeat: alert on first missed ping — a dead scheduler silently skips invoice delivery.
Monitoring Checklist
| Service | Monitor Type | Check Interval | Alert Threshold | |---|---|---|---| | Crater web interface | HTTP | 1 min | 1 failure | | Application health (DB + cache) | HTTP | 1 min | 1 failure | | Crater API | HTTP | 1 min | 1 failure | | PDF generation service | HTTP | 2 min | 2 failures | | Email delivery (SMTP) | HTTP | 5 min | 2 failures | | Stripe webhook endpoint | HTTP | 1 min | 1 failure | | PayPal webhook endpoint | HTTP | 1 min | 1 failure | | Laravel scheduler heartbeat | Heartbeat | 5 min | 1 missed ping |
Conclusion
Crater handles your invoicing and billing — infrastructure where downtime directly costs money. With Vigilmon watching every layer from the web interface to the scheduler heartbeat, you'll know about failures before they become missed payments or angry client emails. Set up these eight monitors in under 30 minutes, and your billing infrastructure gets the same reliability attention your product already gives to customer-facing features.