tutorial

Crater Invoice Monitoring with Vigilmon: Uptime, API Health & Scheduler Heartbeats

Monitor your self-hosted Crater invoicing app with Vigilmon — track web UI availability, REST API health, database connectivity, SSL certificates, and Laravel scheduler heartbeats.

Your recurring invoice job silently failed three weeks ago. Clients never received payment reminders. Your Crater instance was "up" — the server responded — but the Laravel task scheduler had died and no one noticed until a client asked why their invoice was overdue.

Crater is a free, open-source invoice management application built on Laravel (PHP backend) and Vue.js (frontend). It's the go-to self-hosted alternative to FreshBooks and QuickBooks for freelancers and small businesses who want professional invoicing without a SaaS subscription. But self-hosting means you own the monitoring too. Vigilmon gives you external uptime checks, keyword monitors, SSL alerts, and heartbeat detection that cover every failure mode Crater exposes.

This tutorial walks you through end-to-end Crater monitoring with Vigilmon.

What You'll Build

  • An HTTP monitor on the Crater login page (web UI availability)
  • An HTTP monitor on the /api/v1/company REST endpoint (API health + database connectivity)
  • A keyword monitor on the dashboard to detect database errors
  • SSL certificate expiry alerts for HTTPS Crater deployments
  • A heartbeat monitor for the Laravel task scheduler (recurring invoices and payment reminders)

Prerequisites

  • A running Crater instance (self-hosted, any version)
  • A free account at vigilmon.online

Step 1: Monitor the Crater Login Page

The login page at /login is the entry point for every Crater user. If this returns anything other than 200, your team and clients cannot reach the invoicing system.

Test it first:

curl -o /dev/null -s -w "%{http_code}" https://your-crater.example.com/login

Set up the Vigilmon monitor:

  1. Log in to Vigilmon and click New Monitor → HTTP.
  2. Set URL to https://your-crater.example.com/login.
  3. Set Check interval to 60 seconds.
  4. Set Expected status code to 200.
  5. Under Advanced → Keyword check, add:
    • Keyword present: Crater
  6. Save the monitor.

The keyword check ensures you're getting a real Crater page, not a 200 OK from a parked domain or CDN error page.


Step 2: Monitor the /api/v1/company REST Endpoint

Crater exposes a REST API used by its Vue.js frontend. The /api/v1/company endpoint returns basic company configuration and requires an authenticated session to return data — but an unauthenticated request will return a structured JSON error (401 or 422) rather than a 5xx, which is enough to confirm the API layer is alive and the database is reachable.

Test it:

curl -s -o /dev/null -w "%{http_code}" https://your-crater.example.com/api/v1/company

You'll typically get a 401 (unauthenticated) or a redirect to login — both confirm the API is responding. A 500 or 502 means something is broken.

Set up the Vigilmon monitor:

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://your-crater.example.com/api/v1/company.
  3. Set Check interval to 60 seconds.
  4. Under Advanced, set Expected status codes to 200,401,422 (any of these confirms the API is alive).
  5. Save the monitor.

If the API returns a 500, 502, or 503, Vigilmon fires an alert — indicating a PHP-FPM crash, a database connection failure, or a misconfigured .env.


Step 3: Keyword Monitor for Database Connectivity

Crater's dashboard page loads live invoice and client data from MySQL/PostgreSQL. A keyword monitor on the dashboard response catches the scenario where the web server is up but the database is unreachable — a situation where a plain HTTP monitor would miss the failure.

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://your-crater.example.com/ (or /dashboard if Crater redirects authenticated users there — test which URL is accessible without auth).
  3. Set Expected status code to 200.
  4. Under Advanced → Keyword check, configure:
    • Keyword present: Crater
    • Keyword absent: SQLSTATE, Connection refused, 500 Server Error
  5. Save the monitor.

These absent keywords match Laravel's default database error strings. If MySQL drops, the next request that touches the DB will surface one of them in the HTML response, and Vigilmon will fire.


Step 4: SSL Certificate Monitoring

A lapsed SSL certificate on your Crater instance will lock out every user with a browser warning and break the Vue.js frontend's API calls entirely (mixed content errors). Self-managed certificates from Let's Encrypt auto-renew — but auto-renewal can fail silently if Certbot or acme.sh loses connectivity, file permissions change, or port 80 is blocked.

Vigilmon checks your certificate on every HTTP monitor poll. To configure SSL alerting:

  1. Open the HTTP monitor you created in Step 1 (the login page).
  2. Click Edit → Advanced → SSL Certificate.
  3. Set Alert when certificate expires in less than: 14 days.
  4. Save.

You can apply the same setting to the API monitor from Step 2. With two monitors watching the certificate from different URL paths, you won't miss a renewal failure.


Step 5: Heartbeat Monitor for the Laravel Task Scheduler

Crater's scheduled tasks are the silent engine behind recurring invoice generation and payment reminder emails. These run via Laravel's task scheduler, which is invoked by a system cron entry — typically:

* * * * * cd /path/to/crater && php artisan schedule:run >> /dev/null 2>&1

If this cron entry is deleted, the system cron daemon crashes, or PHP throws a fatal error in schedule:run, recurring invoices stop generating with no visible error. The Crater UI continues to work perfectly — only heartbeat monitoring catches this failure.

Set up a Vigilmon Heartbeat monitor:

  1. Click New Monitor → Heartbeat in Vigilmon.
  2. Give it a name like Crater Scheduler.
  3. Set Expected interval to 5 minutes (heartbeat must arrive at least every 5 minutes).
  4. Copy the generated heartbeat URL — it looks like https://vigilmon.online/ping/<your-unique-token>.
  5. Save the monitor.

Wire the heartbeat into Crater's scheduler:

Open app/Console/Kernel.php in your Crater installation and add a ping to the heartbeat URL at the end of the schedule definition:

protected function schedule(Schedule $schedule)
{
    // ... existing Crater scheduled tasks ...

    // Heartbeat ping — confirms scheduler is running
    $schedule->call(function () {
        Http::get('https://vigilmon.online/ping/<your-unique-token>');
    })->everyFiveMinutes();
}

Or, if you prefer a shell-level approach without touching application code, add a second cron entry:

*/5 * * * * curl -fsS -m 10 --retry 5 https://vigilmon.online/ping/<your-unique-token> > /dev/null 2>&1

If Vigilmon does not receive a ping within 5 minutes (plus a grace period you configure), it fires an alert. Your recurring invoices and payment reminders are confirmed running as long as the heartbeat is green.


Step 6: Alert Channels

Go to Notifications → New Channel in Vigilmon and configure:

  • Email — direct alerts to your billing or operations team
  • Webhook — post to Slack, Discord, or a PagerDuty integration for on-call routing

A Vigilmon alert for a down Crater instance looks like:

🔴 DOWN: Crater Login Page (your-crater.example.com)
Status: 502 Bad Gateway
Region: US-East
Triggered: 2026-03-10 08:42 UTC

A heartbeat alert looks like:

🔴 MISSING HEARTBEAT: Crater Scheduler
Last ping received: 47 minutes ago
Expected every: 5 minutes

Step 7: Status Page

Go to Status Pages → New Status Page in Vigilmon. Add all your Crater monitors and publish the page. Share the URL with your team or embed the status badge:

<a href="https://vigilmon.online/status/<your-slug>">
  <img src="https://vigilmon.online/badge/<monitor-slug>" alt="Crater Status" />
</a>

What You've Built

| Failure scenario | How Vigilmon catches it | |---|---| | Web server (Nginx/Apache) down | HTTP monitor on /login detects non-200 | | PHP-FPM crash | API monitor on /api/v1/company detects 502/503 | | MySQL/PostgreSQL unreachable | Keyword monitor catches SQLSTATE error in response | | Laravel app error (500) | API monitor fires on unexpected 500 status | | SSL certificate expiry | SSL alert on HTTPS monitors fires 14 days out | | Laravel scheduler stopped | Heartbeat monitor fires when ping stops arriving | | Recurring invoices not generating | Heartbeat monitor (scheduler) catches the failure |


Self-hosting Crater gives you full control over your invoicing infrastructure — but external monitoring is the safety net that turns silent failures into immediate alerts. Vigilmon watches your Crater instance from outside your network, so you know before your clients do.

Start monitoring your Crater instance today — register free at vigilmon.online.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →