tutorial

Monitoring Akaunting with Vigilmon

Akaunting is a free, open-source online accounting platform — but self-hosting means managing your own uptime. Here's how to monitor Akaunting's web UI, API health, SSL certificates, and scheduled artisan commands with Vigilmon.

Akaunting is a free, open-source online accounting platform built on Laravel — supporting multi-company setups, multi-currency transactions, and an app store for extensions. For freelancers, small businesses, and accountants who self-host it as a QuickBooks or Wave alternative, Akaunting holds financial records that must always be accessible. Vigilmon gives you the monitoring layer Akaunting doesn't include: HTTP health checks, Laravel API response monitoring, SSL certificate alerts, and heartbeat monitoring for the artisan scheduler that drives recurring financial transactions.

What You'll Set Up

  • HTTP uptime monitor for the Akaunting web UI login page
  • Laravel API token endpoint health check
  • SSL certificate expiry alerts for HTTPS Akaunting deployments
  • Cron heartbeat for Akaunting's Laravel scheduler (artisan schedule:run)

Prerequisites

  • Akaunting installed and accessible over HTTP or HTTPS
  • A free Vigilmon account

Step 1: Monitor the Akaunting Web UI

The Akaunting login page is the primary health signal for the entire application. A failure here means either the web server, PHP-FPM, or the database is down.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Akaunting URL: https://accounting.yourdomain.com/auth/login.
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Under Keyword check, enter Akaunting to confirm the correct page loads (the page title includes this string).
  7. Click Save.

The keyword check distinguishes a real Akaunting login page from a generic error page or maintenance response — both of which can return HTTP 200 without serving the application.


Step 2: Monitor the Laravel API Health Endpoint

Akaunting exposes a REST API under /api. The authentication endpoint (/api/auth/token) is useful as a health probe because it validates the full Laravel application stack — routing, middleware, and database — without requiring valid credentials. A well-formed POST to this endpoint returns a predictable JSON response (either a token or an error) rather than a server error.

Add a monitor for the auth API endpoint:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the URL: https://accounting.yourdomain.com/api/auth/token.
  3. Set Method to POST.
  4. Set Expected HTTP status to 401 (unauthenticated request returns 401, which confirms the API is responding correctly).
  5. Under Keyword check, enter Unauthenticated (Akaunting's standard error message for missing credentials).
  6. Set Check interval to 5 minutes.
  7. Click Save.

A 401 response from the API means Laravel is running, routing is working, and the database connection is healthy. A 500 or timeout means the stack has a problem.

Alternatively, if you have a read-only API token, you can use:

GET https://accounting.yourdomain.com/api/companies
Authorization: Bearer YOUR_API_TOKEN

This returns 200 with company data and gives you a positive confirmation rather than a negative probe.


Step 3: Verify Database Connectivity via HTTP Response

Akaunting connects to MySQL/MariaDB on every request. Database failures surface as Laravel exception pages or blank responses. The keyword check from Step 1 already catches most cases — the login page will not render the Akaunting keyword if the database is unreachable.

For an explicit database signal, Akaunting (like any Laravel app) exposes application errors in the HTTP response body when in debug mode, or returns a 500 status in production. Monitor the API endpoint from Step 2 — a 500 response there immediately indicates a database or application error.

If you want a dedicated health check route, add one to your Akaunting installation. In routes/api.php:

Route::get('/health', function () {
    DB::connection()->getPdo();
    return response()->json(['status' => 'ok']);
})->middleware([]);

Then add a Vigilmon monitor for https://accounting.yourdomain.com/api/health with an expected 200 status and keyword ok.


Step 4: SSL Certificate Alerts

Akaunting stores financial records, bank account details, and client invoices. An expired SSL certificate will trigger browser security warnings that lock users out and may cause loss of trust with clients who receive invoices via the platform's email features.

Add SSL monitoring to the web UI monitor:

  1. Open the monitor for https://accounting.yourdomain.com/auth/login.
  2. Enable Monitor SSL certificate under the SSL section.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

If you use a reverse proxy (nginx, Caddy) in front of Akaunting and terminate SSL there, the certificate to monitor is the one on the proxy — not on Akaunting itself (which typically runs on HTTP internally).


Step 5: Heartbeat Monitoring for Artisan Scheduled Commands

Akaunting uses Laravel's task scheduler (artisan schedule:run) for recurring financial tasks: generating recurring transactions, sending scheduled payment reminders, queuing reports, and syncing connected bank accounts via apps. These require a system cron entry to run every minute:

# /etc/cron.d/akaunting
* * * * * www-data cd /var/www/akaunting && php artisan schedule:run >> /dev/null 2>&1

If this cron entry fails — because PHP is unavailable, the working directory path is wrong after an upgrade, or the artisan binary is missing — all scheduled financial tasks stop silently. Clients stop receiving reminders, recurring invoices don't generate, and bank syncs halt.

Use Vigilmon's heartbeat to detect this:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to 5 minutes (to allow for the 1-minute cron + schedule overhead).
  3. Copy the heartbeat URL (e.g. https://vigilmon.online/heartbeat/abc123).
  4. Update your cron entry:
* * * * * www-data cd /var/www/akaunting && php artisan schedule:run >> /dev/null 2>&1 && curl -s https://vigilmon.online/heartbeat/abc123

Now, if schedule:run fails for any reason, the heartbeat ping is never sent and Vigilmon alerts after the grace period.

For Akaunting installed via Docker Compose, add the heartbeat ping to the scheduler service's entrypoint or use a sidecar container:

services:
  scheduler:
    image: akaunting/akaunting
    command: >
      sh -c "while true; do php artisan schedule:run && curl -s https://vigilmon.online/heartbeat/abc123; sleep 60; done"

Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add email, Slack, or a webhook endpoint.
  2. On the web UI monitor, set Consecutive failures before alert to 2 — Laravel cold starts and database connection pool resets can cause single-probe failures.
  3. On the API endpoint monitor, set it to 1 — a 500 from the API means something is genuinely broken and should alert immediately.
  4. On the SSL monitor, the default single-alert is appropriate since certificate expiry is deterministic.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web UI | /auth/login with keyword check | PHP/web server/database failure | | API health | /api/auth/token (expects 401) | Laravel app stack failure | | SSL certificate | Akaunting hostname | Certificate expiry, renewal failure | | Artisan heartbeat | Heartbeat URL | Failed recurring tasks, silent scheduler failure |

Akaunting automates the financial workflows your business depends on — recurring invoices, payment reminders, multi-currency reporting. Vigilmon ensures those workflows keep running and the platform stays reachable, so your financial data is always available when you or your clients need it.

Monitor your app with Vigilmon

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

Start free →