tutorial

Invoice Ninja Monitoring with Vigilmon: Uptime, API Health & Scheduler Checks

Keep your self-hosted Invoice Ninja instance healthy — monitor the Laravel API, detect database failures, track scheduler runs, and get alerted before your recurring invoices stop sending.

Your Invoice Ninja recurring invoices stopped generating three days ago. The scheduler silently failed, no late fees were applied, and your clients never got their monthly statements. You found out when a client emailed to ask why their invoice hadn't arrived.

Invoice Ninja is the most capable open-source invoicing platform available — clients, products, invoices, quotes, recurring billing, expenses, projects, time tracking, and a full client portal, all self-hosted on your own server. But self-hosted means self-monitored. Vigilmon gives you the external uptime layer that catches downtime, API failures, and stalled schedulers before they cost you money.

This tutorial covers monitoring Invoice Ninja end-to-end with Vigilmon.

What You'll Build

  • A Vigilmon HTTP monitor on Invoice Ninja's unauthenticated ping endpoint
  • A keyword monitor that detects database connection failures
  • A heartbeat monitor for the Laravel task scheduler
  • SSL certificate expiry alerts for your client portal
  • Alert channels for your team

Prerequisites

  • A self-hosted Invoice Ninja v5 instance (Docker Compose or native PHP/Laravel install)
  • Invoice Ninja serving on port 80/443 or 8080 behind a reverse proxy
  • A free account at vigilmon.online

Step 1: Monitor the Invoice Ninja API Ping Endpoint

Invoice Ninja v5 ships with an unauthenticated health check at /api/v1/ping. This is the canonical way to confirm the Laravel PHP-FPM backend is alive and the application has booted.

Test it from your server or locally:

curl https://invoices.yourdomain.com/api/v1/ping

Expected response:

{"data":"pong"}

No authentication required. A 200 response with "pong" confirms the Laravel application container has started, PHP-FPM is processing requests, and the application bootstrap completed successfully.

Set up the Vigilmon monitor:

  1. Log in to Vigilmon and click New Monitor → HTTP.
  2. Set URL to https://invoices.yourdomain.com/api/v1/ping.
  3. Set Check interval to 60 seconds.
  4. Set Expected status code to 200.
  5. Under Advanced → Keyword check, add:
    • Keyword present: pong
  6. Save the monitor.

Vigilmon now polls the ping endpoint every minute from multiple regions and fires an alert the moment it stops returning "pong".


Step 2: Monitor the Application Login Page

The ping endpoint confirms PHP is running, but a healthy login page confirms two additional layers: your reverse proxy (nginx/Caddy) is routing traffic correctly, and the session/cookie middleware has initialized.

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://invoices.yourdomain.com/ (the root URL — Invoice Ninja redirects to the login or dashboard).
  3. Set Expected status code to 200 (or 302 if your setup redirects to /login).
  4. Under Advanced → Keyword check, configure:
    • Keyword present: Invoice Ninja (the page title or footer branding)
  5. Save.

If your nginx proxy is down while PHP-FPM is running, the ping endpoint may be unreachable but this monitor catches the 502 from the public URL.


Step 3: Keyword Monitor for Database Failures

A Laravel application that cannot reach its database (MySQL, PostgreSQL, or SQLite) will render an error page rather than the login form. Laravel's default error page includes the string SQLSTATE in the stack trace when database connectivity fails.

Add a keyword monitor that fires if a database error appears on the login page:

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://invoices.yourdomain.com/ (same root URL as Step 2).
  3. Set Expected status code to 200.
  4. Under Advanced → Keyword check, configure:
    • Keyword absent: SQLSTATE
    • Keyword absent: database connection
  5. Save.

When the database goes down, Laravel renders a 500 error page containing SQLSTATE[HY000] — Vigilmon detects the absent expected content and the present error string simultaneously, firing an alert before any of your users encounter it.


Step 4: Heartbeat Monitor for the Laravel Scheduler

Invoice Ninja relies heavily on the Laravel task scheduler for recurring invoice generation, payment reminders, bank transaction sync, late fee application, and report generation. If the scheduler stops running — due to a missed cron entry, a server restart that doesn't restart the cron daemon, or a PHP timeout — your billing operations go silent without any visible error.

Configure a Vigilmon heartbeat:

  1. In Vigilmon, click New Monitor → Heartbeat.
  2. Give it a name like Invoice Ninja Scheduler.
  3. Set the Expected interval to match your cron frequency (typically 60 seconds for a * * * * * cron entry, or 300 seconds for 5-minute intervals).
  4. Set the Grace period to 120 seconds to allow for slight scheduling drift.
  5. Copy the generated heartbeat URL — it looks like https://vigilmon.online/api/heartbeat/<your-token>.
  6. Save the monitor.

Wire it to your crontab:

Edit your crontab (crontab -e) on the Invoice Ninja server and append a ping after the Laravel scheduler command:

* * * * * cd /path/to/invoiceninja && php artisan schedule:run >> /dev/null 2>&1 && curl -s https://vigilmon.online/api/heartbeat/<your-token> > /dev/null

Or, if you run Invoice Ninja via Docker Compose:

* * * * * docker exec invoiceninja_app php artisan schedule:run >> /dev/null 2>&1 && curl -s https://vigilmon.online/api/heartbeat/<your-token> > /dev/null

The && ensures Vigilmon only receives the ping when schedule:run exits cleanly. If the artisan command fails, no ping is sent and Vigilmon fires a missed-heartbeat alert after the grace period.


Step 5: SSL Certificate Monitoring

Invoice Ninja's client portal must be accessible over HTTPS. Payment gateway webhooks (Stripe, PayPal) require a valid TLS certificate to deliver payment confirmation callbacks. An expired certificate breaks the client portal, blocks payment processing, and prevents clients from viewing or paying invoices.

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://invoices.yourdomain.com/api/v1/ping.
  3. Under Advanced → SSL certificate, enable:
    • Alert when certificate expires in fewer than 30 days
    • Alert when certificate expires in fewer than 7 days
  4. Save.

Vigilmon checks the TLS handshake on every poll and sends expiry warnings well before your Let's Encrypt or commercial certificate lapses.

For client portal subdomains: If your Invoice Ninja setup uses a separate subdomain for the client portal (e.g., portal.yourdomain.com), add a dedicated SSL monitor for that domain — a certificate expiry there breaks client invoice access and payment flows even if your main domain's cert is valid.


Step 6: Alert Channels

Go to Notifications → New Channel in Vigilmon and configure:

  • Email — immediate alerts to your billing or operations team
  • Webhook — post to Slack, Discord, or a PagerDuty integration

A scheduler heartbeat miss alert in Slack looks like:

🔴 MISSED: Invoice Ninja Scheduler
Last ping received: 2026-01-15 03:00 UTC
Expected interval: 60s | Grace: 120s
Action required: check cron and artisan schedule:run

When the scheduler recovers:

✅ RECOVERED: Invoice Ninja Scheduler
Gap: 18 minutes (18 missed runs)

Step 7: Status Page

Go to Status Pages → New Status Page in Vigilmon. Add all monitors:

  • Invoice Ninja API Ping
  • Invoice Ninja Login Page
  • Invoice Ninja Database Check
  • Invoice Ninja Scheduler (heartbeat)
  • SSL Certificate

Publish the page and share the URL with your operations team. Embed the status badge in your internal admin notes or infrastructure runbook.


What You've Built

| Scenario | How Vigilmon catches it | |---|---| | PHP-FPM process crash | API ping monitor returns non-200 | | nginx/Caddy proxy down | Login page monitor detects 502 | | Database (MySQL/PostgreSQL) unreachable | Keyword monitor detects SQLSTATE error | | Laravel scheduler stopped | Heartbeat monitor fires missed-beat alert | | Recurring invoices not generating | Same heartbeat alert surfaces the scheduler gap | | SSL certificate expiry | Certificate monitor fires 30-day and 7-day warnings | | Let's Encrypt renewal failure | SSL monitor catches the expired cert before clients do | | Payment gateway webhook failures (cert) | SSL monitor on client portal domain |


Invoice Ninja handles the complexity of running a professional billing operation — but only if all its moving parts keep running. Vigilmon gives you the external perspective your Laravel logs can't: an independent check from outside your network that confirms every layer is working, from the TCP connection through the TLS handshake to the API response.

Start monitoring your Invoice Ninja 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 →