tutorial

Monitoring Ackee Self-Hosted Analytics with Vigilmon

Ackee is a self-hosted analytics server — but it has no built-in uptime monitoring. Here's how to monitor your Ackee instance, its API, and underlying MongoDB with Vigilmon.

Ackee is a privacy-focused, self-hosted analytics tool that tracks page views without collecting personal data. Running it yourself means you own the data — but also the responsibility of keeping it running. Vigilmon gives you HTTP uptime checks, API health monitoring, SSL certificate alerts, and heartbeat monitoring for the background processes Ackee depends on.

What You'll Set Up

  • HTTP uptime monitor for the Ackee web UI
  • GraphQL API health check via Vigilmon keyword monitoring
  • SSL certificate expiry alerts
  • Cron heartbeat to verify Ackee's data-processing loop is alive
  • Alert channels for Slack, email, or webhook

Prerequisites

  • Ackee deployed and accessible (Docker or Node.js, version 3.x recommended)
  • A free Vigilmon account
  • Basic familiarity with your Ackee domain and its Docker Compose or systemd setup

Step 1: Monitor the Ackee Web UI

Ackee serves a React dashboard on the root URL of your domain. Add a basic uptime check:

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

This catches the most common failure modes: container crash, out-of-memory kill, or networking misconfiguration.


Step 2: Monitor the Ackee GraphQL API

Ackee exposes all analytics data through a GraphQL endpoint at /api. A healthy response confirms the Node.js backend is running and can accept queries. Use Vigilmon's keyword monitor to validate the response body:

  1. Click Add MonitorHTTP / HTTPS.
  2. Set the URL to https://ackee.yourdomain.com/api.
  3. Set Method to POST.
  4. Add a request header: Content-Type: application/json.
  5. Set the Request body to:
    {"query": "{ __typename }"}
    
  6. Under Keyword check, enter __typename — Ackee returns this in a healthy GraphQL response.
  7. Set Expected HTTP status to 200.
  8. Click Save.

If the API returns a 500 error or the keyword is missing, Vigilmon alerts you before your users notice blank dashboards.


Step 3: Add an /health Endpoint to Ackee (Optional but Recommended)

Ackee does not ship a /health endpoint by default. If you are running Ackee behind a reverse proxy you control, add a simple proxy stub:

nginx example

location /health {
    return 200 'ok';
    add_header Content-Type text/plain;
}

Caddy example

respond /health 200

Then point your Vigilmon monitor at https://ackee.yourdomain.com/health instead of the root URL for a lighter-weight check that bypasses the React bundle.


Step 4: SSL Certificate Alerts

Ackee is typically served over HTTPS via Let's Encrypt. Certificate renewal failures can silently break tracking scripts embedded on your sites (browsers block mixed-content requests). Add a certificate expiry monitor:

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

A 21-day window gives you three renewal cycles to investigate and fix a failing certbot or Caddy renewal before the certificate expires.


Step 5: Heartbeat Monitoring for Ackee Background Processing

Ackee aggregates raw page-view events into statistics on a schedule. If you run Ackee via Docker Compose with a scheduled aggregation job or a separate cron, use Vigilmon's cron heartbeat:

  1. In Vigilmon, click Add MonitorCron Heartbeat.

  2. Set the expected ping interval to your aggregation frequency (e.g. 60 minutes).

  3. Copy the heartbeat URL, e.g. https://vigilmon.online/heartbeat/abc123.

  4. Append a curl call to your aggregation script or cron entry:

    # /etc/cron.hourly/ackee-aggregate
    docker exec ackee node cli/index.js aggregate
    curl -s https://vigilmon.online/heartbeat/abc123
    

If the aggregation job crashes before sending the ping, Vigilmon alerts you after the expected interval.

For Docker Compose users, add the curl call to your entrypoint wrapper or a dedicated healthcheck service:

services:
  ackee:
    image: electerious/ackee
    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://localhost:3000/api"]
      interval: 60s
      timeout: 10s
      retries: 3

Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add your preferred channel (Slack, email, PagerDuty, or webhook).
  2. Set Consecutive failures before alert to 2 on the UI monitor — a single failed probe during a container restart is normal. Two consecutive failures indicate a real outage.
  3. Keep Consecutive failures before alert at 1 on the GraphQL API monitor — API failures are more deterministic and worth alerting on immediately.

To suppress alerts during planned maintenance (e.g. docker compose pull && docker compose up -d), use the Vigilmon API:

curl -X POST https://vigilmon.online/api/maintenance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"monitor_id": "YOUR_MONITOR_ID", "duration_minutes": 5}'

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP uptime | https://ackee.yourdomain.com | Container crash, OOM kill | | GraphQL API | https://ackee.yourdomain.com/api | Backend failure, DB disconnect | | SSL certificate | Ackee domain | Let's Encrypt renewal failure | | Cron heartbeat | Heartbeat URL | Aggregation job crash |

Self-hosting Ackee means your analytics data stays off third-party servers — and with Vigilmon watching your instance around the clock, your dashboard stays online too.

Monitor your app with Vigilmon

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

Start free →