tutorial

Monitoring Offen Fair Web Analytics with Vigilmon

Offen is a consent-first self-hosted analytics tool. Learn how to monitor your Offen instance's HTTP endpoint, database, and SSL certificate with Vigilmon so you never lose visibility into your traffic data.

Offen is a fair, open, self-hosted web analytics platform that lets users opt in and inspect the data collected about them. It runs as a single Go binary with an embedded SQLite or PostgreSQL database — simple to deploy, but equally your responsibility to keep running. Vigilmon gives you HTTP uptime checks, API health monitoring, SSL certificate alerts, and cron heartbeats to confirm Offen's data ingestion is healthy.

What You'll Set Up

  • HTTP uptime monitor for the Offen dashboard
  • API endpoint health check confirming data ingestion is live
  • SSL certificate expiry alert
  • Cron heartbeat for scheduled database backup jobs
  • Alert channels for immediate notification on failure

Prerequisites

  • Offen deployed and accessible (Docker or binary, version 0.4+ recommended)
  • A free Vigilmon account
  • Your Offen instance URL and admin credentials

Step 1: Monitor the Offen Dashboard

Offen serves an operator dashboard and a user-facing "audit" view from the same origin. A successful HTTP check against the root URL confirms the binary is running:

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

Step 2: Monitor the Offen Event Ingestion API

Offen collects page-view events at POST /api/events. A healthy response confirms the Go process is running and can write to its database. Use Vigilmon's keyword monitor to validate a lightweight API probe:

  1. Click Add MonitorHTTP / HTTPS.
  2. Set the URL to https://offen.yourdomain.com/healthz (Offen exposes this endpoint in recent versions).
  3. Set Expected HTTP status to 200.
  4. Under Keyword check, enter ok — Offen returns {"status":"ok"} on a healthy response.
  5. Click Save.

If your Offen version does not expose /healthz, probe the root URL instead and check for the keyword offen in the HTML body, which appears in the default Offen page title.


Step 3: SSL Certificate Alerts

The Offen binary can manage its own TLS certificate via Let's Encrypt (using the OFFEN_SERVER_LETSENCRYPTDOMAIN env var) or you may terminate TLS at a reverse proxy. Either way, add a certificate expiry alert:

  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.

If you use Offen's built-in Let's Encrypt, also verify the renewal port is open:

# Check port 80 is accessible (needed for HTTP-01 challenge)
curl -I http://offen.yourdomain.com

Step 4: Verify Offen's Configuration at Startup

Offen validates its configuration on startup and exits with a non-zero code if the database is unreachable or the configuration is invalid. To catch silent misconfiguration after a container restart, add a startup probe using Vigilmon's TCP monitor:

  1. Click Add MonitorTCP.
  2. Enter your Offen host: offen.yourdomain.com.
  3. Set Port to 443 (or 80 if not using TLS).
  4. Set Check interval to 1 minute.
  5. Click Save.

A TCP probe is faster and more lightweight than an HTTP check — it confirms the port is listening even if the HTTP layer has a transient error.


Step 5: Heartbeat Monitoring for Database Backup Jobs

Offen stores analytics data in SQLite or PostgreSQL. Regular backups protect you against data loss. Wrap your backup script with a Vigilmon heartbeat ping:

  1. In Vigilmon, click Add MonitorCron Heartbeat.

  2. Set the expected ping interval to your backup frequency (e.g. 1440 minutes for daily).

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

  4. Add the ping to your backup script:

    #!/bin/bash
    # /etc/cron.daily/offen-backup
    set -e
    
    # SQLite backup
    sqlite3 /var/lib/offen/offen.db ".backup /backups/offen-$(date +%F).db"
    
    # Signal success
    curl -s https://vigilmon.online/heartbeat/abc123
    

    For PostgreSQL:

    pg_dump offen | gzip > /backups/offen-$(date +%F).sql.gz
    curl -s https://vigilmon.online/heartbeat/abc123
    

If the backup job crashes before the ping, Vigilmon alerts you after 24 hours — before the next backup window closes.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook endpoint.
  2. On the HTTP uptime monitor, set Consecutive failures before alert to 2 to avoid false alarms during container restarts.
  3. On the /healthz API monitor, set Consecutive failures before alert to 1 — API failures warrant immediate attention.

To suppress alerts during Offen upgrades:

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

# Pull and restart Offen
docker compose pull offen && docker compose up -d offen

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP uptime | https://offen.yourdomain.com | Binary crash, port unreachable | | API health | https://offen.yourdomain.com/healthz | Database disconnect, startup failure | | SSL certificate | Offen domain | TLS renewal failure | | TCP port | :443 | Reverse proxy or network issue | | Cron heartbeat | Heartbeat URL | Backup job failure |

Offen's privacy-first approach puts data control back in your hands — and Vigilmon makes sure the server hosting that data never goes dark without you knowing.

Monitor your app with Vigilmon

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

Start free →