tutorial

Kopia Monitoring with Vigilmon: Backup Server Uptime, Snapshot Health & Policy Enforcement Checks

Monitor your self-hosted Kopia backup repository server with Vigilmon — track server uptime, backup job completion, snapshot storage health, policy enforcement, and client connectivity to ensure your backups are actually running.

Your Kopia backup server has been down for six days. You don't know yet. The automated backup jobs silently fail. The snapshots that you thought were protecting your critical data stopped being written on Tuesday. You'll find out when you need to restore something.

Kopia is an open-source backup tool with a self-hosted repository server written in Go. It runs on port 51515 by default and provides a REST API, a web UI, and a CLI for managing backup policies, snapshots, and repository storage. Self-hosting Kopia gives you full control — and full responsibility for knowing when things break.

Vigilmon monitors your Kopia server from outside your infrastructure, the way an external observer would. If the server goes down, if client connections fail, or if the API stops responding, Vigilmon alerts you before you discover the gap during a recovery attempt.

What You'll Build

  • An HTTP monitor on Kopia's repository server uptime
  • A snapshot storage health check via the API
  • A backup policy enforcement monitor
  • A client connectivity probe
  • Alert channels for your backup operations team

Prerequisites

  • A self-hosted Kopia repository server (v0.15+ recommended)
  • Default port: 51515 (HTTPS)
  • A free account at vigilmon.online

Step 1: Monitor Repository Server Uptime

Kopia's repository server exposes an API on port 51515. The /api/v1/repo/status endpoint returns a response that confirms the server is alive and the repository is connected.

Test it (Kopia uses TLS by default, so use -k to skip cert verification in testing, or provide your CA cert):

curl -k -u your-username:your-password https://your-kopia-host:51515/api/v1/repo/status

Expected response when the repository is connected:

{
  "connected": true,
  "description": "Repository",
  "readonly": false,
  "formatVersion": "2"
}

A "connected": true response confirms the server is running and the underlying storage backend (local disk, S3, B2, Azure, GCS, etc.) is reachable.

Set up the Vigilmon monitor:

  1. Log in to Vigilmon and click New Monitor → HTTP.
  2. Set URL to https://your-kopia-host:51515/api/v1/repo/status.
  3. Set Check interval to 60 seconds.
  4. Set Expected status code to 200.
  5. If your server requires HTTP basic auth, set credentials under Advanced → Auth.
  6. Under Advanced → Keyword check, add:
    • Keyword present: "connected"
  7. Save the monitor.

This monitor catches the most critical failure: the Kopia server process crashing or the storage backend becoming unreachable.


Step 2: Monitor Snapshot Storage Health

Kopia snapshots are the unit of backup — each completed backup run creates a snapshot entry. Monitoring the snapshot list endpoint confirms that the snapshot metadata layer is healthy and readable.

curl -k -u your-username:your-password \
  "https://your-kopia-host:51515/api/v1/snapshots?userName=all"

This returns a list of snapshot manifests. A healthy response (even an empty list) confirms that the repository index is accessible and Kopia can read snapshot metadata.

If the storage backend is degraded — for example, an S3 bucket with expired credentials or a mounted volume that unmounted — this endpoint will return an error or time out even if the Kopia process itself is still running.

Set up the Vigilmon monitor:

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://your-kopia-host:51515/api/v1/snapshots?userName=all.
  3. Set Expected status code to 200.
  4. Set Auth to your Kopia credentials.
  5. Set Check interval to 300 seconds (5 minutes is sufficient — snapshot metadata doesn't change every minute).
  6. Save the monitor.

Step 3: Monitor Backup Policy Enforcement Service

Kopia backup policies define retention rules, scheduling, and compression settings. When the policy service is healthy, scheduled backup tasks run on time. Monitor the policy endpoint to confirm the policy layer is responsive:

curl -k -u your-username:your-password \
  https://your-kopia-host:51515/api/v1/policy?userName=all

Expected: a JSON object with policy definitions. Any non-error response confirms that the policy enforcement service can read and apply rules.

Set up the Vigilmon monitor:

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://your-kopia-host:51515/api/v1/policy?userName=all.
  3. Set Expected status code to 200.
  4. Set Auth to your Kopia credentials.
  5. Set Check interval to 600 seconds (10 minutes).
  6. Save the monitor.

Step 4: Monitor Client Connectivity

Kopia clients (CLI or GUI) connect to the repository server to run backup jobs. If the server's authentication layer breaks, clients silently fail to connect and no backups run. Probe client connectivity by testing the authentication endpoint directly:

curl -k -u your-username:your-password \
  https://your-kopia-host:51515/api/v1/current-user

Expected response:

{
  "username": "your-username",
  "hostname": "kopia-server"
}

A 200 with the expected username confirms clients can authenticate and establish sessions. A 401 or 403 (with valid credentials) indicates the authentication service is misconfigured.

Set up the Vigilmon monitor:

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://your-kopia-host:51515/api/v1/current-user.
  3. Set Expected status code to 200.
  4. Set Auth to your Kopia credentials.
  5. Under Advanced → Keyword check, add:
    • Keyword present: "username"
  6. Set Check interval to 120 seconds.
  7. Save the monitor.

Step 5: Monitor the Kopia Web UI

Kopia optionally serves a web UI for managing snapshots, policies, and repository settings through a browser. Monitor it to detect cases where the web server is up but the app is broken:

curl -k -o /dev/null -s -w "%{http_code}" https://your-kopia-host:51515/

Set up the Vigilmon monitor:

  1. Click New Monitor → HTTP in Vigilmon.
  2. Set URL to https://your-kopia-host:51515/.
  3. Set Expected status code to 200.
  4. Under Advanced → Keyword check, add:
    • Keyword present: "Kopia"
  5. Set Check interval to 300 seconds.
  6. Save the monitor.

Step 6: Alert Channels

Go to Notifications → New Channel in Vigilmon and configure:

  • Email — immediate alerts to your backup administrator or on-call team
  • Webhook — Slack, Discord, or PagerDuty for team-wide visibility

A failing repository server alert in Slack looks like:

🔴 DOWN: kopia-repo-server (HTTP monitor)
Expected status 200, got connection refused
Region: EU-Central
Triggered: 2026-04-02 01:18 UTC

When the server recovers:

✅ RECOVERED: kopia-repo-server
Downtime: 11 minutes

Set critical-severity for the repository status and snapshot monitors. Use warning-level for the policy and web UI monitors. If the repository server is down for more than 10 minutes, escalate to your backup disaster recovery contact using Vigilmon's Alerting → Escalation settings.


What You've Built

| Scenario | How Vigilmon catches it | |---|---| | Kopia server process crash | HTTP monitor on :51515/api/v1/repo/status fails | | Storage backend unreachable (S3, disk, GCS) | Repository status shows "connected": false | | Snapshot metadata layer corrupted | /api/v1/snapshots returns error or times out | | Authentication service broken | /api/v1/current-user returns 401 unexpectedly | | Policy enforcement service down | /api/v1/policy endpoint returns 502 | | TLS certificate expired | Vigilmon reports TLS handshake failure on HTTPS monitor | | Web UI unavailable | Keyword monitor misses "Kopia" in response |


Backups only matter when you can restore from them — and you can only restore if the backup jobs actually ran. External monitoring with Vigilmon is the safety net that tells you when Kopia stops running, long before you need the data.

Start monitoring your Kopia backup server today — register free at vigilmon.online.

Monitor your app with Vigilmon

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

Start free →