tutorial

How to Monitor Kimai with Vigilmon

Keep your open-source time tracking server healthy — monitor the Kimai web UI, health endpoint, cron heartbeat, and SSL certificate with Vigilmon.

Kimai is one of the most popular open-source time tracking platforms: self-hosted, team-friendly, and built on Symfony. When Kimai goes down, employees stop logging hours, project billing gaps accumulate silently, and reports become unreliable. Vigilmon monitors your Kimai instance from multiple geographic regions and alerts you before anyone notices the tracker is broken.

What You'll Set Up

  • Vigilmon HTTP monitor for the Kimai web UI
  • A monitor for the Kimai health endpoint
  • A cron heartbeat monitor for Kimai's scheduled tasks
  • An SSL certificate expiry alert

Prerequisites

  • A running Kimai instance (v2.x, self-hosted)
  • A free Vigilmon account
  • SSH access to your server (for cron heartbeat setup)

Why Kimai Needs External Monitoring

Kimai depends on more than just a running web server. Its core functionality relies on scheduled tasks: invoices are generated by cron, reminders are sent by cron, and background export jobs run on a schedule. If PHP-FPM stalls, the database goes away, or the cron daemon stops, Kimai may appear healthy in a browser while silently failing to process time entries or generate billable reports.

External uptime monitoring from Vigilmon covers the full surface: it checks that Kimai's front door is responding, that its health endpoint confirms all internal services are up, and that scheduled tasks are still running via heartbeat pings.


Step 1: Monitor the Kimai Web UI

Start with the most visible check — the Kimai login page.

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

Vigilmon will begin probing from multiple regions. Within a minute, response time data appears on the dashboard. If Kimai's web container restarts or Nginx misconfigures, this monitor fires first.


Step 2: Monitor the Kimai Health Endpoint

Kimai exposes a built-in health check endpoint at /health that verifies database connectivity and application readiness.

  1. Click Add Monitor again.
  2. Set Type to HTTP / HTTPS.
  3. Enter https://kimai.yourdomain.com/health.
  4. Set Expected status code to 200.
  5. In Expected body contains, enter "status":"ok".
  6. Click Save.

A healthy Kimai health response looks like:

{
  "status": "ok",
  "database": "ok"
}

This monitor catches database connection failures that the web UI check misses — Kimai may still serve the login page from cache even when the database is unreachable.


Step 3: Set Up a Cron Heartbeat Monitor

Kimai relies heavily on scheduled tasks: kimai:invoice:create, kimai:reminder:send, and others. If the system cron stops running these commands, time tracking data accumulates but billing and reporting break silently.

A cron heartbeat monitor inverts the usual pattern: instead of Vigilmon polling Kimai, Kimai pings Vigilmon on each cron run. If the ping stops arriving, Vigilmon alerts you.

Create the Heartbeat Monitor

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Name it Kimai Cron.
  3. Set the expected ping interval to 5 minutes (or match your actual cron schedule).
  4. Copy the generated heartbeat URL — it looks like https://vigilmon.online/heartbeat/YOUR_TOKEN.

Wire It Into the Kimai Cron

On your server, edit the crontab for the user that runs Kimai:

crontab -e

Add a line that runs the Kimai console command and then pings Vigilmon on success:

*/5 * * * * cd /var/www/kimai && php bin/console kimai:cron:dispatch && curl -s https://vigilmon.online/heartbeat/YOUR_TOKEN

Alternatively, if you use a dedicated Kimai cron script, append the curl call at the end of the script.

Now if the cron job fails to run — due to permission errors, PHP misconfiguration, or the cron daemon dying — Vigilmon will fire a missing-heartbeat alert within one interval of the missed ping.


Step 4: Monitor the SSL Certificate

A lapsed SSL certificate locks every user out of Kimai with a browser security warning.

  1. In Vigilmon, click Add MonitorSSL Certificate.
  2. Enter your Kimai domain, e.g. kimai.yourdomain.com.
  3. Set Alert days before expiry to 21 (or 30 for extra lead time).
  4. Click Save.

Vigilmon checks the certificate daily and alerts you well before it expires, giving you time to renew via Certbot or your certificate provider without a production outage.


Step 5: Configure Alert Channels

Route alerts to wherever your team responds fastest.

Email (built-in)

Vigilmon sends email alerts by default to your account email. Verify this is a monitored inbox.

Slack Webhook

  1. In Slack, create an incoming webhook for your #ops-alerts channel.
  2. In Vigilmon, go to Alert ChannelsAdd ChannelWebhook.
  3. Paste the Slack webhook URL.
  4. Use this payload template:
{
  "text": "🚨 *{{monitor_name}}* is {{status}}!\nURL: {{url}}\nTime: {{timestamp}}"
}
  1. Attach this channel to all four Kimai monitors.

Step 6: Verify the Setup

  1. Simulate UI downtime: Temporarily change the Kimai monitor URL to a nonexistent path and confirm an alert fires.
  2. Test the heartbeat: Skip one cron run and confirm Vigilmon sends a missing-heartbeat alert after the expected interval.
  3. Check the dashboard: Vigilmon's dashboard shows uptime percentage, response time history, and SSL expiry countdown — bookmark it for your on-call runbook.

Going Further

  • Response time threshold: Set a warn threshold at 1500ms and critical at 4000ms — Kimai rendering can slow under heavy report generation, and early warning helps you diagnose before users complain.
  • Database-level check: If you expose a custom /api/health endpoint via a Symfony bundle that checks queue depth, add a dedicated Vigilmon monitor for it.
  • Staging parity: Mirror all four monitors on your staging Kimai instance so you catch environment drift before it reaches production.

Your Kimai installation is now covered end-to-end: web UI availability, deep health verification, cron job continuity, and SSL certificate safety.

Monitor your app with Vigilmon

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

Start free →