tutorial

Gonic Monitoring with Vigilmon: Subsonic API Health, Library Scan & Uptime Alerts

Monitor your self-hosted Gonic music streaming server with Vigilmon — track web UI availability on port 4747, Subsonic API ping, library scan status, and SSL certificate expiry.

Your Gonic server stopped indexing music three days ago and you had no idea. New albums you added aren't showing up in your Subsonic apps, and your carefully curated FLAC library is quietly falling behind. For self-hosters who run lightweight Go-based music servers, silent failures are the hardest to catch.

Gonic is an open-source, self-hosted music streaming server that implements the Subsonic API in Go. It's fast, dependency-light, and compatible with every Subsonic client — DSub, Symfonium, Substreamer, Ultrasonic. Vigilmon gives you the external monitoring that catches Gonic failures before they affect your music experience — covering the web UI, Subsonic API compatibility, library scan status, and SSL certificate health.

This tutorial walks you through monitoring Gonic end-to-end with Vigilmon.

What You'll Build

  • A Vigilmon HTTP monitor on Gonic's web UI (port 4747)
  • A Subsonic API ping monitor verifying the API layer and SQLite database
  • A library scan status monitor confirming the music indexer completed
  • SSL certificate expiry alerts for reverse-proxied HTTPS deployments
  • A library growth heartbeat monitor
  • Alert channels for immediate notification

Prerequisites

  • A running Gonic instance (default HTTP on port 4747)
  • A Gonic admin username and password (for authenticated Subsonic API checks)
  • A free account at vigilmon.online

Step 1: Monitor Gonic Web UI Availability

Gonic serves its web interface on port 4747 by default. A GET request to / returns either the Gonic web interface or a login redirect — either way, a 200 response confirms the Go HTTP server is running and accepting connections.

Test it from your terminal:

curl -I http://music.yourdomain.com:4747/

Expected response:

HTTP/1.1 200 OK

Set up the Vigilmon monitor:

  1. Log in to Vigilmon and click New Monitor → HTTP.
  2. Set URL to http://music.yourdomain.com:4747/.
  3. Set Check interval to 60 seconds.
  4. Set Expected status code to 200.
  5. Save the monitor.

If you're running Gonic behind a reverse proxy, use your proxy's HTTPS URL instead and skip the port number.


Step 2: Monitor the Subsonic API with the Ping Endpoint

Gonic's core value is its Subsonic API compatibility. The /rest/ping.view endpoint is the standard Subsonic health check — it requires no user authentication beyond basic API parameters and exercises the full Gonic API layer including the SQLite database.

Test the Subsonic ping:

curl "http://music.yourdomain.com:4747/rest/ping.view?v=1.16.1&c=healthcheck&f=json"

Expected response:

{
  "subsonic-response": {
    "status": "ok",
    "version": "1.16.1"
  }
}

The status: "ok" field confirms the Gonic API layer and its SQLite database are accessible. If the database file becomes corrupted or locked, or if Gonic encounters a startup error, this endpoint returns an error status or fails entirely.

Set up the monitor in Vigilmon:

  1. Click New Monitor → HTTP.
  2. Set URL to http://music.yourdomain.com:4747/rest/ping.view?v=1.16.1&c=healthcheck&f=json.
  3. Set Expected status code to 200.
  4. Under Advanced → Keyword check:
    • Keyword present: "ok"
  5. Save.

The keyword "ok" appears in the status field of every healthy Subsonic response. A failed Gonic instance or database error returns "failed" or a non-200 HTTP status.


Step 3: Monitor Library Scan Status

Gonic scans your local music directory and indexes tracks into a SQLite database. After a fresh start, a system reboot, or when Gonic is configured to scan on startup, it's important to verify the scan completed and the library is populated.

The /rest/getScanStatus.view endpoint returns scan state including whether a scan is in progress and how many songs have been indexed.

Test the scan status endpoint (requires authentication):

curl "http://music.yourdomain.com:4747/rest/getScanStatus.view?v=1.16.1&c=healthcheck&f=json&u=admin&p=yourpassword"

Expected response after a completed scan:

{
  "subsonic-response": {
    "status": "ok",
    "scanStatus": {
      "scanning": false,
      "count": 4823
    }
  }
}

scanning: false confirms the indexer has finished its run. count is the number of indexed songs — a count of 0 after a scan that should have found music indicates a misconfigured music directory path.

Set up the monitor in Vigilmon:

  1. Click New Monitor → HTTP.
  2. Set URL to http://music.yourdomain.com:4747/rest/getScanStatus.view?v=1.16.1&c=healthcheck&f=json&u=admin&p=yourpassword.
  3. Set Expected status code to 200.
  4. Under Advanced → Keyword check:
    • Keyword present: "ok"
  5. Save.

For security, create a dedicated read-only Gonic user for monitoring rather than using the admin account in the URL.


Step 4: SSL Certificate Monitoring

If you're running Gonic behind a reverse proxy (Nginx, Caddy, Traefik) with HTTPS, SSL certificate expiry will disconnect all your Subsonic clients. Subsonic apps are strict about certificate validity — an expired cert means silent failure with a cryptic network error.

Vigilmon monitors SSL certificate validity automatically for HTTPS monitors. To configure dedicated expiry alerts:

  1. Open your HTTPS Gonic monitor in Vigilmon.
  2. Go to Settings → SSL.
  3. Enable Alert when certificate expires within 14 days.
  4. Optionally enable Alert when certificate expires within 30 days for early warning.

You'll receive alerts like:

⚠️  SSL Warning: music.yourdomain.com
Certificate expires in 8 days (2026-07-21)

Let's Encrypt auto-renewal via Certbot or Caddy can fail silently after server migrations. Vigilmon catches the gap before your Subsonic clients stop connecting.


Step 5: Library Growth Heartbeat

A healthy Gonic library should grow as you add new music to your watched directory. If the periodic scan stops running — because of a configuration change, a filesystem permission issue, or a Docker volume remount — your library silently stops updating.

Use /rest/getIndexes.view to verify the library is populated:

curl "http://music.yourdomain.com:4747/rest/getIndexes.view?v=1.16.1&c=healthcheck&f=json&u=admin&p=yourpassword"

Expected response excerpt:

{
  "subsonic-response": {
    "status": "ok",
    "indexes": {
      "index": [
        { "name": "A", "artist": [...] },
        { "name": "B", "artist": [...] }
      ]
    }
  }
}

A non-empty index array confirms the library contains indexed artists and albums. If the library is empty, the index array will be empty or absent.

Set up the heartbeat monitor in Vigilmon:

  1. Click New Monitor → HTTP.
  2. Set URL to http://music.yourdomain.com:4747/rest/getIndexes.view?v=1.16.1&c=healthcheck&f=json&u=admin&p=yourpassword.
  3. Set Expected status code to 200.
  4. Under Advanced → Keyword check:
    • Keyword present: "artist"
  5. Save.

The keyword "artist" appears in the response when at least one artist is indexed. A fully empty library won't include this key, alerting you that the scan stopped or the music directory path is wrong.


Step 6: Alert Channels

Go to Notifications → New Channel in Vigilmon and configure your preferred alert delivery:

  • Email — immediate alerts to your inbox
  • Webhook — forward to Discord, Slack, or ntfy.sh for push notifications on mobile

For Discord, paste your server webhook URL. A Gonic downtime alert looks like:

🔴 DOWN: music.yourdomain.com:4747/rest/ping.view (HTTP connection refused)
Gonic Subsonic API health check failed
Region: EU-West
Triggered: 2026-01-15 04:11 UTC

Recovery notification:

✅ RECOVERED: music.yourdomain.com:4747/rest/ping.view
Downtime: 6 minutes

Step 7: Status Page

Go to Status Pages → New Status Page in Vigilmon. Add your Gonic monitors and publish. Share with household members or co-listeners so they can check server status without contacting you.


What You've Built

| Scenario | How Vigilmon catches it | |---|---| | Gonic process crash or restart failure | Web UI monitor returns connection refused | | SQLite database corrupted or locked | Subsonic ping returns status: "failed" | | Library scan still running (not complete) | Scan status shows scanning: true unexpectedly | | Music directory misconfigured after Docker remount | Scan count drops to 0 | | Library stops growing (scan cron stopped) | getIndexes heartbeat shows no artists | | SSL certificate expired or expiring | SSL expiry alert triggers at threshold | | Reverse proxy misconfiguration | HTTPS monitor detects 502 |


Gonic's lightweight Go architecture means it rarely crashes — but the SQLite database, filesystem mounts, and periodic scan configuration are all points of silent failure. Vigilmon monitors from outside your network, from multiple regions, with no agents to install.

Start monitoring your Gonic 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 →