tutorial

Monitoring FossBilling with Vigilmon

FossBilling is the open-source WHMCS alternative for web hosting companies and SaaS operators — but silent billing failures mean missed renewals and unhappy clients. Here's how to monitor FossBilling endpoints, SSL certificates, and scheduled tasks with Vigilmon.

FossBilling handles the billing logic that keeps your hosting company or SaaS business running: subscription renewals, domain management, client invoicing, and support ticketing. When the client area goes down or the cron scheduler stops firing, invoices don't get generated, domain expiry notices don't get sent, and clients can't log in to manage their services. Vigilmon monitors the FossBilling web UI, REST API, admin panel, and cron scheduler so billing interruptions become immediate alerts instead of angry support tickets.

What You'll Set Up

  • HTTP uptime monitor for the FossBilling client area homepage
  • REST API availability check for the system version endpoint
  • Admin panel login page health check
  • SSL certificate alerts for HTTPS FossBilling deployments
  • Cron heartbeat for the FossBilling task scheduler (invoices, renewals, domain expiry)

Prerequisites

  • FossBilling installed and running (PHP/Symfony, typically on Apache or Nginx)
  • FossBilling accessible over HTTP or HTTPS at your domain
  • A free Vigilmon account

Step 1: Monitor the FossBilling Client Area

The client area is the primary interface your customers use to manage their subscriptions, raise support tickets, and pay invoices. Downtime here directly impacts client experience and revenue.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your FossBilling URL: https://billing.yourdomain.com
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

If your FossBilling installation is in a subdirectory (e.g. /billing/), use the full path:

https://yourdomain.com/billing/

A 200 response confirms the PHP application is serving the client area. A 500 or 502 typically means a PHP-FPM crash, a database connection failure, or a misconfigured environment variable.


Step 2: Monitor the REST API Version Endpoint

FossBilling exposes a guest REST API that doesn't require authentication. The /api/guest/system/version endpoint returns the installed version as a JSON response — monitoring it confirms the API layer is functional, which all client-facing features depend on.

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the URL: https://billing.yourdomain.com/api/guest/system/version
  3. Set Expected HTTP status to 200.
  4. Set Response body contains to "version" to validate the JSON response is well-formed.
  5. Set Check interval to 1 minute.
  6. Click Save.

A healthy response looks like:

{
  "result": {
    "version": "0.6.0",
    "php_version": "8.2.10"
  },
  "error": null
}

If the API returns a 500 or non-JSON body, it's often caused by a PHP error, a missing configuration file, or a database connection timeout. This check catches those failures before clients hit them on the checkout or login pages.


Step 3: Monitor the Admin Panel

The FossBilling admin panel at /admin/dashboard is where your team manages client accounts, processes manual orders, and handles support tickets. If the admin panel goes down separately from the client area (for example, due to an .htaccess restriction misconfiguration or a PHP session issue), your team loses operational access.

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the URL: https://billing.yourdomain.com/admin/dashboard
  3. Set Expected HTTP status to 200 (FossBilling renders the login page for unauthenticated requests).
  4. Set Check interval to 5 minutes (admin panel monitoring is less time-critical than the client area).
  5. Click Save.

The admin login page is served at /admin/dashboard — even without authentication, FossBilling returns a 200 with the login form HTML. A 404 or 403 indicates a routing problem or web server misconfiguration.


Step 4: SSL Certificate Alerts

HTTPS is critical for any billing platform — browsers will block access to HTTP-only payment or client data pages with security warnings. FossBilling typically runs behind Nginx or Apache with a Let's Encrypt certificate. Auto-renewal failures are silent until a client reports a certificate warning.

Add a certificate expiry monitor:

  1. Open the HTTPS monitor created in Step 1.
  2. Enable Monitor SSL certificate in the SSL section.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

To check the current certificate from the command line:

echo | openssl s_client -connect billing.yourdomain.com:443 2>/dev/null \
  | openssl x509 -noout -dates
# notAfter=Sep 30 12:00:00 2025 GMT

If you use Certbot for Let's Encrypt renewal, verify the renewal timer is running:

systemctl status certbot.timer
# Active: active (waiting) since ...

A 21-day alert window gives you three weeks to diagnose renewal failures and renew manually if needed:

certbot renew --dry-run
certbot renew
systemctl reload nginx

Step 5: Heartbeat Monitoring for the FossBilling Cron Scheduler

FossBilling relies entirely on its cron-based scheduler for automated business operations: generating invoices, processing subscription renewals, sending domain expiry notifications, and running payment gateway hooks. If the cron job stops running, none of these fire — subscriptions go un-renewed, clients don't get payment reminders, and overdue invoices accumulate silently.

The recommended FossBilling cron runs every 5 minutes:

# In your crontab (crontab -e)
*/5 * * * * php /var/www/billing/cron.php >> /var/log/fossbilling-cron.log 2>&1

Use Vigilmon's cron heartbeat to confirm each run completes.

In Vigilmon:

  1. Click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to 10 minutes (allowing for one missed 5-minute run before alerting).
  3. Copy the heartbeat URL (e.g. https://vigilmon.online/heartbeat/abc123).

Update the cron entry:

*/5 * * * * php /var/www/billing/cron.php && curl -s https://vigilmon.online/heartbeat/abc123

The && ensures Vigilmon is only pinged when cron.php exits with status 0. If FossBilling's cron throws a PHP fatal error or the database is unreachable, the heartbeat is not sent and Vigilmon alerts after 10 minutes without a ping.

To verify the cron is running correctly, check the log:

tail -f /var/log/fossbilling-cron.log
# [2025-07-12 14:05:01] Cron started
# [2025-07-12 14:05:02] Processing invoices: 3 generated
# [2025-07-12 14:05:03] Cron completed successfully

Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add email, Slack, or a webhook for billing system alerts.
  2. Set Consecutive failures before alert to 2 on the client area monitor — a brief PHP-FPM restart or Nginx configuration reload can cause a single probe to fail.
  3. Keep Consecutive failures at 1 for the admin panel if your team needs immediate access during incidents.
  4. Add a Maintenance window when deploying FossBilling updates:
# Suppress alerts during a FossBilling upgrade
curl -X POST https://vigilmon.online/api/maintenance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"monitor_id": "abc123", "duration_minutes": 15}'

# Run FossBilling update
cd /var/www/billing
git pull origin main
composer install --no-dev
php artisan migrate

Summary

| Monitor | Target | What It Catches | |---|---|---| | Client area | https://billing.domain.com | PHP crash, database down, homepage errors | | REST API | /api/guest/system/version | API layer failure, JSON response errors | | Admin panel | /admin/dashboard | Admin routing failure, session issues | | SSL certificate | Port 443 HTTPS | Let's Encrypt renewal failure | | Cron heartbeat | Heartbeat URL | Scheduler stopped, invoice/renewal failures |

FossBilling handles money and client trust — silent failures have real revenue consequences. With Vigilmon monitoring your client area, REST API, admin panel, SSL certificate, and cron scheduler, billing infrastructure problems surface as immediate alerts instead of client complaints about missed invoices or inaccessible service portals.

Monitor your app with Vigilmon

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

Start free →