tutorial

Monitoring Slash with Vigilmon

Slash is your self-hosted link shortener and bookmark manager — but a crashed redirect service means every short URL your team shares returns an error. Here's how to monitor Slash end-to-end with Vigilmon.

Slash is an open-source link shortener and bookmark manager from the Memos team, built in Go and React, running on port 5231. Teams use it to create memorable short URLs (s/onboarding, s/runbook, s/design) that route to long internal or external destinations. The core short-URL redirect path is latency-sensitive — a slow or unavailable redirect service degrades every link your team shares in Slack, email, or documentation. Vigilmon monitors Slash's web server, redirect engine, API, and scheduled cleanup jobs so short URLs stay fast and reliable.

What You'll Set Up

  • Web server and dashboard uptime monitor (port 5231)
  • Short-URL redirect service response time check
  • REST API endpoint health monitor
  • TLS certificate expiry alert
  • Scheduled link cleanup job heartbeat
  • Authentication service health via API probe

Prerequisites

  • Slash running (binary, Docker, or behind a reverse proxy)
  • Web UI accessible at http://yourhost:5231 or https://s.yourdomain.com
  • A free Vigilmon account

Step 1: Monitor the Slash Web Server

The web server serves both the admin dashboard and the redirect engine. If it goes down, all short URLs return connection errors.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Slash URL: https://s.yourdomain.com (or http://yourhost:5231).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Enable Monitor SSL certificate if using HTTPS, with expiry alert at 21 days.
  7. Click Save.

Step 2: Monitor the Short-URL Redirect Service

The redirect path is the most latency-sensitive part of Slash. Every click on a short link goes through it. Monitor a known redirect to validate the full resolution path — not just that the server is up, but that the lookup and redirect are working:

  1. Click Add MonitorHTTP / HTTPS.
  2. Create a dedicated probe shortcut in Slash (e.g., probe pointing to https://vigilmon.online).
  3. URL: https://s.yourdomain.com/s/probe.
  4. Set Expected HTTP status to 301 or 302 (redirect response).
  5. Enable Follow redirects: disabled (you want to catch the redirect, not the destination).
  6. Set Check interval to 1 minute.
  7. Click Save.

A failure on this check while the dashboard is healthy means the redirect engine or database lookup has failed — the most impactful Slash failure mode.


Step 3: Monitor the REST API

Slash exposes a gRPC-gateway REST API. Probe the API to confirm the backend and database (PostgreSQL or SQLite) are responding:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: https://s.yourdomain.com/api/v1/workspace.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

If Slash is configured to require authentication, use the /api/v1/shortcut endpoint with an API token:

  1. Under Request headers, add:
    Authorization: Bearer YOUR_SLASH_API_TOKEN
    
  2. URL: https://s.yourdomain.com/api/v1/shortcut.
  3. Expected status: 200.

An API failure while the web UI is reachable usually indicates a database connectivity problem or a corrupted SQLite file.


Step 4: Check the Admin Panel Accessibility

The admin panel requires authentication. Verify it's reachable (even if you can't authenticate programmatically):

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: https://s.yourdomain.com/signin.
  3. Expected status: 200.
  4. Check interval: 5 minutes.
  5. Click Save.

A 404 or 500 on the signin page indicates a frontend build issue or misconfigured reverse proxy — different from an API or database failure.


Step 5: Monitor the Browser Extension API Health

Slash includes a browser extension that lets users save bookmarks directly. The extension calls API endpoints to save and list shortcuts. Monitor these endpoints to ensure extension users aren't silently failing:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: https://s.yourdomain.com/api/v1/shortcut?filter=ACTIVE.
  3. Set Expected HTTP status to 200.
  4. Add the Authorization: Bearer YOUR_SLASH_API_TOKEN header.
  5. Check interval: 5 minutes.
  6. Click Save.

Step 6: Heartbeat for Link Expiry and Cleanup Jobs

Slash can mark shortcuts as expired and run background cleanup. If your deployment runs scheduled jobs (via cron or an internal scheduler), use a heartbeat to confirm they execute:

  1. Click Add MonitorCron Heartbeat.
  2. Set expected interval to match your cleanup schedule (e.g., 1440 minutes for daily).
  3. Copy the heartbeat URL.
  4. Add the ping to your cleanup script:
#!/bin/bash
# /opt/slash/cleanup.sh
# Prune expired shortcuts via Slash API
curl -s -X DELETE "https://s.yourdomain.com/api/v1/shortcut/expired" \
     -H "Authorization: Bearer YOUR_SLASH_API_TOKEN"

if [ $? -eq 0 ]; then
  curl -s https://vigilmon.online/heartbeat/YOUR_HEARTBEAT_ID
fi

Schedule daily:

0 2 * * * /opt/slash/cleanup.sh

Step 7: Validate Database Connectivity

Slash supports both PostgreSQL and SQLite. For production PostgreSQL deployments, monitor the database port directly:

  1. Click Add MonitorTCP Port.
  2. Host and port: yourhost:5432.
  3. Check interval: 1 minute.
  4. Click Save.

For SQLite deployments, disk space is the critical metric. Add a heartbeat probe:

#!/bin/bash
THRESHOLD=85
USAGE=$(df /var/lib/slash | awk 'NR==2 {print $5}' | tr -d '%')

if [ "$USAGE" -lt "$THRESHOLD" ]; then
  curl -s https://vigilmon.online/heartbeat/YOUR_DB_HEARTBEAT_ID
fi

Schedule every 15 minutes:

*/15 * * * * /opt/slash/disk-check.sh

Step 8: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
  2. For the redirect service monitor (Step 2), set Consecutive failures before alert to 1 — every second of redirect downtime affects real users.
  3. For the API and admin panel monitors, set threshold to 2 to absorb brief Go process restarts.
  4. Use Maintenance windows during Slash version upgrades.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web server (HTTP) | https://s.yourdomain.com | Go process crash, port conflict | | Redirect service | /s/probe | Link resolution failure, DB error | | REST API | /api/v1/workspace | Backend error, DB connectivity | | Admin panel | /signin | Frontend or proxy misconfiguration | | Extension API | /api/v1/shortcut | API auth layer failure | | Cleanup job (heartbeat) | Heartbeat URL | Expired link pruning not running | | PostgreSQL (TCP) | yourhost:5432 | Database server down | | SSL certificate | Domain | TLS expiry |

Slash is the URL fabric your team relies on — every shared link, every runbook shortcut, every onboarding URL passes through it. With Vigilmon monitoring the redirect engine, REST API, database, and scheduled jobs, you catch failures before your team starts reporting broken links.

Monitor your app with Vigilmon

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

Start free →