tutorial

Monitoring Linkstack with Vigilmon

Linkstack is a self-hosted link-in-bio platform — but a down PHP-FPM process, a locked SQLite file, or a failed OAuth login can make your link page vanish. Here's how to monitor every Linkstack component with Vigilmon.

Linkstack is a self-hosted, Laravel-based alternative to Linktree — giving you full control over your link-in-bio pages, custom themes, click analytics, and social OAuth logins. The catch with self-hosting is that when PHP-FPM crashes, the database becomes unavailable, or email delivery breaks, your profile page returns a 500 error to everyone who scans your QR code or clicks your link. Vigilmon catches all of these failure modes with HTTP, TCP, and heartbeat monitors so you're never caught off guard.

What You'll Set Up

  • Web server and PHP-FPM availability monitor
  • Admin dashboard health check
  • Database connectivity probe (SQLite or MySQL)
  • Click tracking endpoint monitor
  • Custom theme rendering check
  • Email notification heartbeat
  • SSL certificate monitoring

Prerequisites

  • Linkstack running on a VPS with Nginx or Apache + PHP-FPM
  • Database configured (SQLite or MySQL)
  • A free Vigilmon account

Step 1: Monitor the Public Profile Endpoint

The most important thing to monitor is whether your Linkstack profile pages are returning successfully — this is what visitors and link-in-bio followers see.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Linkstack URL: https://links.yourdomain.com
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Under Keyword match, enter text that appears on your profile page, such as your username or a link title.
  7. Click Save.

If Linkstack is multi-tenant (hosting multiple users), also monitor at least one user profile URL directly:

https://links.yourdomain.com/@yourusername

A keyword check on the profile page catches cases where the web server returns 200 but Laravel is rendering an error page — which happens when the database is unavailable but the error page itself loads.


Step 2: Monitor PHP-FPM and Web Server Health

PHP-FPM processes can exhaust their worker pool under load or crash silently, leaving Nginx returning 502 Bad Gateway errors. Add a TCP monitor for the PHP-FPM socket or a direct port check:

If PHP-FPM listens on a TCP port (common in Docker setups):

  1. Click Add MonitorTCP Port.
  2. Enter localhost or your server IP and port 9000.
  3. Set Check interval to 1 minute.
  4. Click Save.

For PHP-FPM using a Unix socket, probe the Nginx port instead as an indirect check:

  1. Click Add MonitorTCP Port.
  2. Enter your server IP and port 80 (or 443).
  3. Set Check interval to 1 minute.
  4. Click Save.

Check PHP-FPM process pool status:

# Check active PHP-FPM workers
systemctl status php8.2-fpm

# Check pool status via status page (if enabled in www.conf)
curl http://localhost/fpm-status

Step 3: Monitor the Admin Dashboard

The Linkstack admin panel at /admin requires authentication but should still return a redirect (302 → login page) rather than a 500 or 404. Add a monitor that expects the redirect:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://links.yourdomain.com/admin
  3. Set Expected HTTP status to 302 (redirect to login) or 200 if you've configured it to show the login form directly.
  4. Set Check interval to 5 minutes.
  5. Click Save.

A 500 on the admin endpoint typically means a Laravel misconfiguration, a broken migration, or a missing .env value — all of which affect the entire site, not just admin.


Step 4: Monitor Database Connectivity

Linkstack supports SQLite (default) and MySQL. Database failures cause every page request to return a 500 error.

SQLite: Add a heartbeat script that verifies the database file is readable and responds to queries:

#!/bin/bash
# /usr/local/bin/linkstack-db-check.sh

DB_PATH="/var/www/linkstack/database/database.sqlite"

if [ ! -f "$DB_PATH" ]; then
  echo "Database file missing" >&2
  exit 1
fi

# Run a lightweight query
sqlite3 "$DB_PATH" "SELECT COUNT(*) FROM users;" > /dev/null 2>&1
if [ $? -eq 0 ]; then
  curl -fsS https://vigilmon.online/heartbeat/YOUR_DB_HEARTBEAT_ID
fi

Run every 5 minutes via cron:

*/5 * * * * /usr/local/bin/linkstack-db-check.sh

MySQL: Use a TCP monitor for port 3306 instead of a script:

  1. Click Add MonitorTCP Port.
  2. Enter your MySQL host and port 3306.
  3. Set Check interval to 2 minutes.
  4. Click Save.

Step 5: Monitor Link Click Tracking and Theme Rendering

Linkstack records click events when visitors follow links, and renders custom themes for each profile. Both depend on the full Laravel request pipeline working correctly.

Click tracking: Create a dedicated test link on a private profile and monitor its redirect URL:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter a Linkstack link URL that should redirect: https://links.yourdomain.com/l/test-link-slug
  3. Set Expected HTTP status to 302.
  4. Set Check interval to 10 minutes.
  5. Click Save.

A 500 on a link redirect means click tracking or the redirect handler is broken.

Theme rendering: If you use a custom theme, verify the theme's CSS is loading:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://links.yourdomain.com/css/app.css (adjust path for your theme).
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 10 minutes.
  5. Click Save.

Step 6: Heartbeat for Email Notification Delivery

Linkstack can send email notifications for new followers, link clicks, or admin alerts. These go through Laravel's mail queue. If the mail driver is misconfigured or the SMTP server is unreachable, notifications queue silently.

Add a heartbeat that probes your SMTP server:

#!/bin/bash
# /usr/local/bin/linkstack-smtp-check.sh

SMTP_HOST="smtp.yourdomain.com"
SMTP_PORT="587"

# Test TCP connectivity to SMTP
timeout 5 bash -c "echo '' > /dev/tcp/$SMTP_HOST/$SMTP_PORT" 2>/dev/null
if [ $? -eq 0 ]; then
  curl -fsS https://vigilmon.online/heartbeat/YOUR_SMTP_HEARTBEAT_ID
fi

Run every 15 minutes:

*/15 * * * * /usr/local/bin/linkstack-smtp-check.sh

Step 7: SSL Certificate and Alert Configuration

SSL monitoring:

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

Alert thresholds:

  1. Go to Alert Channels and add Slack, email, or a webhook.
  2. Public profile monitor: Consecutive failures before alert2.
  3. Admin dashboard monitor: Consecutive failures before alert2.
  4. TCP database/SMTP monitors: Consecutive failures before alert1.
  5. Heartbeat monitors alert automatically after one missed interval.

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP profile page | https://links.yourdomain.com | Web server / PHP-FPM crash | | Keyword match | Username or link title in HTML | Laravel 500 behind 200 response | | HTTP admin panel | /admin → 302 | Laravel misconfiguration, broken migration | | TCP PHP-FPM | Port 9000 | PHP-FPM worker pool exhausted | | Database heartbeat | SQLite query or MySQL port 3306 | Database file locked, MySQL down | | HTTP link redirect | /l/test-link-slug → 302 | Click tracking handler broken | | SMTP heartbeat | Port 587 on mail server | Email notification delivery failure | | SSL certificate | Public domain | Let's Encrypt renewal failure |

Your Linkstack profile is the one URL you put on every social account — it has to be up. With Vigilmon monitoring every layer from the web server to the database to the mail relay, you'll know the moment something breaks and can fix it before your audience notices a dead link.

Monitor your app with Vigilmon

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

Start free →