tutorial

How to Monitor Monica CRM with Vigilmon

Keep your Monica personal CRM online — set up health endpoint monitoring, web UI checks, background job heartbeats, and SSL certificate alerts with Vigilmon.

Monica is an open-source personal CRM that helps you maintain meaningful relationships by tracking interactions, reminders, and notes for the people in your life. If you self-host Monica, a silent failure means missed birthday reminders, lost contact history, and an unavailable relationship database. Vigilmon monitors your Monica instance from multiple global regions and alerts you the moment something breaks.

What You'll Set Up

  • HTTP monitor for Monica's health check endpoint
  • Web UI availability check
  • Background job (queue worker) heartbeat
  • SSL certificate expiry alert

Prerequisites

  • A self-hosted Monica instance (Laravel/PHP on Docker, bare metal, or a VPS)
  • A free Vigilmon account

Why Self-Hosted Monica Needs External Monitoring

Monica is a Laravel application that depends on a MySQL/MariaDB database, a PHP-FPM process manager, a web server (Nginx or Apache), and an optional queue worker for scheduled reminders and emails. Any of these can fail silently: PHP-FPM may run out of workers, the database connection pool may exhaust, or the queue worker may stop processing jobs. Your browser might still display Monica's login page from a cached Nginx response while the application is entirely broken underneath. External monitoring from Vigilmon bypasses all of that and tests Monica the way your browser does.


Step 1: Monitor the Health Endpoint

Monica provides a built-in health check endpoint at /health that returns the application's status as JSON. This is your primary monitoring target.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter: https://monica.yourdomain.com/health
  4. Set Check interval to 1 minute.
  5. Set Expected status code to 200.
  6. In Expected body contains, enter "status":"up" — Monica's health response includes this field when the application and database are operational.
  7. Click Save.

If the database is unreachable or a critical service fails, Monica returns a non-200 response and Vigilmon fires an alert immediately.


Step 2: Monitor Web UI Availability

The health endpoint covers internal services, but add a second monitor for the login page to catch any web server or frontend issues that might not surface at the health check level:

  1. Click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter: https://monica.yourdomain.com
  4. Set Expected status code to 200.
  5. In Expected body contains, enter Monica — this confirms the page renders the correct application, not an error page or a default Nginx placeholder.
  6. Set Response time threshold: warn at 1000ms, critical at 3000ms.
  7. Attach your alert channel and save.

Step 3: Monitor Background Jobs (Queue Worker)

Monica uses Laravel queues to send birthday and reminder emails, process contact imports, and handle scheduled tasks. If the queue worker (php artisan queue:work) stops, none of these fire — and you won't notice until you miss an important reminder.

Set up a Vigilmon heartbeat monitor:

  1. Click Add MonitorHeartbeat.
  2. Name it Monica Queue Worker.
  3. Set Expected interval to 5 minutes, Grace period to 3 minutes.
  4. Copy the heartbeat URL (e.g. https://vigilmon.online/heartbeat/mnc456).

On your Monica server, add a cron job that pings this URL only while the queue worker process is running:

# Add to crontab with: crontab -e
*/5 * * * * pgrep -f "artisan queue:work" > /dev/null && curl -fsS --max-time 10 https://vigilmon.online/heartbeat/mnc456

For Docker deployments, add a healthcheck to your queue worker container in docker-compose.yml:

services:
  queue:
    image: monica:latest
    command: php artisan queue:work --sleep=3 --tries=3
    healthcheck:
      test: ["CMD", "pgrep", "-f", "queue:work"]
      interval: 5m
      timeout: 10s
      retries: 1

And add the curl ping as an additional CMD in your worker startup script or as a separate cron container.

If the worker process disappears or the cron stops running, Vigilmon alerts you after the grace period.


Step 4: SSL Certificate Monitoring

An expired SSL certificate makes Monica completely inaccessible — browsers block the login page outright and no amount of clicking through will get your users in. Vigilmon's SSL monitoring catches this weeks before it becomes a problem.

For each HTTPS monitor created above:

  1. Open the monitor settings.
  2. Enable SSL certificate alert.
  3. Set Warn to 21 days before expiry, Critical to 7 days.

Monica's self-hosted instances often use Let's Encrypt certificates renewed via Certbot. Setting the warn threshold to 21 days gives you three renewal windows before the cert actually expires.


Step 5: Configure Alert Channels

  1. In Vigilmon, go to Alert ChannelsAdd Channel.
  2. Choose Email for personal alerts or Slack for team deployments.
  3. For Slack, paste the incoming webhook URL and click Test to confirm the message appears in your channel.
  4. Attach the channel to all Monica monitors under each monitor's Alert Channels tab.

Since Monica is a personal tool for many users, email alerts to your personal address are often the right choice over a team Slack channel.


Step 6: Verify the Monitoring Setup

Before trusting these monitors:

  1. Temporarily change Expected body contains on your health monitor to DOES_NOT_EXIST, wait 2 minutes, and confirm an alert fires.
  2. Restore the correct value and confirm recovery notification arrives.
  3. Review the Response time history in Vigilmon. Monica's response time increases significantly when the database is under load or when running contact import jobs — understanding your baseline helps you tune thresholds.

Going Further

  • Artisan scheduler check: Monica also relies on php artisan schedule:run firing from the system cron. Add a second heartbeat monitor for the scheduler and ping it from the cron entry: * * * * * cd /path/to/monica && php artisan schedule:run >> /dev/null 2>&1 && curl -fsS https://vigilmon.online/heartbeat/sched123.
  • Database backup monitoring: If you back up Monica's MySQL database via a cron script, add a third heartbeat for backup completion.
  • Status page: Monica users who share an instance with family or a small team will appreciate a public Vigilmon status page showing current service health.

Your Monica CRM is now fully monitored: health endpoint, web UI, queue worker liveness, and SSL certificate expiry — all without running any agents inside your server.

Monitor your app with Vigilmon

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

Start free →