tutorial

Monitoring Vanilla Forums with Vigilmon

Vanilla Forums powers community discussion for thousands of sites — but PHP-FPM crashes, MySQL connectivity issues, or a broken search index can silently degrade your community experience. Here's how to monitor every Vanilla Forums service layer with Vigilmon.

Vanilla Forums is the open-source community platform that powers discussion forums, Q&A sites, and support communities for organizations that want full control over their community data. Running Vanilla self-hosted means you're responsible for keeping the PHP stack, MySQL database, search indexing, and email delivery healthy — all at once. A PHP-FPM process pool exhaustion silently returns 502 errors; a corrupted search index sends all search queries into timeouts; a broken SMTP relay means new user registrations never receive confirmation emails. Vigilmon gives you continuous monitoring across every Vanilla Forums service layer so you catch problems before your community does.

What You'll Set Up

  • Web server availability monitoring (port 80/443)
  • PHP-FPM process health monitoring
  • MySQL database connectivity
  • Search indexing service health (Sphinx or Elasticsearch)
  • Email notification delivery
  • File upload and CDN integration monitoring
  • Spam filter service health
  • SSO/OAuth endpoint monitoring
  • Background job queue health

Prerequisites

  • Vanilla Forums installed and running (Apache or nginx + PHP-FPM)
  • Admin access to your Vanilla installation
  • A free Vigilmon account

Step 1: Monitor the Vanilla Forums Web Server

Vanilla Forums serves on port 80 (HTTP) or 443 (HTTPS) via Apache or nginx. This is your primary availability check.

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

Vanilla's front page requires the database and session layer to render. For a lightweight health check that doesn't hit the database, create a dedicated health endpoint file:

<?php
// public/health.php
// Basic PHP health check — serves 200 OK without hitting the database
http_response_code(200);
header('Content-Type: application/json');
echo json_encode(['status' => 'ok', 'timestamp' => time()]);

Add an HTTP monitor for https://community.yourdomain.com/health.php and add a keyword check for "status":"ok". For a full-stack check that exercises the database, monitor the discussions page:

https://community.yourdomain.com/discussions

Set the keyword check to verify your forum name appears in the response body.


Step 2: Monitor PHP-FPM Process Health

PHP-FPM manages the pool of PHP workers that handle all Vanilla requests. Process pool exhaustion (when all workers are busy) causes new requests to queue and eventually time out — returning 502 Bad Gateway from nginx or Apache.

Monitor PHP-FPM via its built-in status page. First, enable it in your PHP-FPM pool configuration:

; /etc/php/8.x/fpm/pool.d/www.conf
pm.status_path = /fpm-status

Then configure your web server to expose it only on localhost:

# nginx: add inside your server block
location /fpm-status {
    allow 127.0.0.1;
    deny all;
    fastcgi_pass unix:/run/php/php8.x-fpm.sock;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

Reload PHP-FPM and nginx:

systemctl reload php8.x-fpm nginx

Now add a local HTTP proxy or expose a health script that interprets the PHP-FPM status:

#!/bin/bash
# Check PHP-FPM pool utilization
FPM_STATUS=$(curl -s http://127.0.0.1/fpm-status)
ACTIVE=$(echo "$FPM_STATUS" | grep "^active processes" | awk '{print $NF}')
TOTAL=$(echo "$FPM_STATUS" | grep "^max children reached" | awk '{print $NF}')

# Alert if FPM isn't responding or if max children has been hit recently
if [ -n "$ACTIVE" ] && [ "$TOTAL" = "0" ]; then
  curl -s https://vigilmon.online/heartbeat/YOUR_FPM_HEARTBEAT_ID
fi

Schedule this check every 2 minutes via cron. A max children reached count greater than zero indicates PHP-FPM pool exhaustion is occurring.


Step 3: Monitor MySQL Database

Vanilla Forums stores all posts, users, categories, reactions, and settings in MySQL. A database failure is total — every page request fails.

  1. Add a TCP monitor in Vigilmon.
  2. Set Host to your MySQL server hostname (or 127.0.0.1 if local).
  3. Set Port to 3306.
  4. Set Check interval to 1 minute.
  5. Click Save.

For a deeper check that verifies Vanilla's specific tables are accessible, add a cron heartbeat:

#!/bin/bash
DB_HOST="localhost"
DB_USER="vanilla_user"
DB_PASS="your_password"
DB_NAME="vanilla"

# Check that Vanilla's Discussion table is accessible
ROW_COUNT=$(mysql -h "$DB_HOST" -u "$DB_USER" -p"$DB_PASS" "$DB_NAME" \
  -s -e "SELECT COUNT(*) FROM GDN_Discussion LIMIT 1" 2>/dev/null)

if [ -n "$ROW_COUNT" ]; then
  curl -s https://vigilmon.online/heartbeat/YOUR_DB_HEARTBEAT_ID
fi

Schedule every 5 minutes. This check verifies not just that MySQL is listening, but that Vanilla's database tables are intact and accessible with the configured credentials.


Step 4: Monitor Search Indexing Service

Vanilla Forums supports Sphinx Search and Elasticsearch for full-text search. When the search index is unavailable or out of date, search returns errors or stale results — and on active communities, search is one of the most-used features.

For Sphinx Search, add a TCP monitor:

  1. Add a TCP monitor in Vigilmon.
  2. Set Host to your Sphinx server hostname.
  3. Set Port to 9312 (Sphinx default).
  4. Set Check interval to 2 minutes.
  5. Click Save.

For Elasticsearch, probe the cluster health endpoint:

http://your-es-host:9200/_cluster/health

Add an HTTP monitor with expected status 200 and a keyword check for "status":"green" or "status":"yellow" (yellow is degraded but functional; red means data loss risk).

Add a cron heartbeat to verify the search index is being updated (not just that the service is running):

#!/bin/bash
# Check Sphinx indexer ran recently (check index file modification time)
INDEX_PATH="/var/lib/sphinx/data/vanilla.spa"

if [ -f "$INDEX_PATH" ]; then
  LAST_MODIFIED=$(stat -c %Y "$INDEX_PATH")
  NOW=$(date +%s)
  AGE_HOURS=$(( (NOW - LAST_MODIFIED) / 3600 ))
  
  # Alert if index is older than 2 hours
  if [ "$AGE_HOURS" -lt "2" ]; then
    curl -s https://vigilmon.online/heartbeat/YOUR_SEARCH_HEARTBEAT_ID
  fi
fi

Step 5: Monitor Email Notification Delivery

Vanilla Forums sends emails for new registrations, discussion replies, private messages, and digest summaries. Broken email delivery means new users never verify their accounts, preventing community growth.

Add a TCP monitor for your SMTP relay:

  1. Add a TCP monitor in Vigilmon.
  2. Set Host to your SMTP server hostname.
  3. Set Port to 587 (submission) or 25 (relay).
  4. Set Check interval to 5 minutes.
  5. Click Save.

For deeper verification, create a health check that attempts SMTP authentication:

#!/bin/bash
SMTP_HOST="smtp.yourdomain.com"
SMTP_PORT="587"
SMTP_USER="noreply@yourdomain.com"
SMTP_PASS="your_smtp_password"

# Test SMTP authentication
RESULT=$(curl -s --url "smtp://$SMTP_HOST:$SMTP_PORT" \
  --user "$SMTP_USER:$SMTP_PASS" \
  --upload-file /dev/null 2>&1)

if echo "$RESULT" | grep -q "Connection"; then
  curl -s https://vigilmon.online/heartbeat/YOUR_EMAIL_HEARTBEAT_ID
fi

Schedule every 15 minutes.


Step 6: Monitor File Upload and CDN Integration

Vanilla Forums supports local file storage and CDN integration for uploaded images and attachments. A broken upload service means users can't attach files to posts, and a CDN misconfiguration means images stop loading.

For CDN-served assets, add an HTTP monitor for a known static asset:

https://cdn.yourdomain.com/uploads/health-check.png

Upload a small test image to your uploads directory (or CDN origin) and monitor it. Expected status 200 confirms the CDN is serving files from the correct origin.

For local file storage, add a cron heartbeat:

#!/bin/bash
UPLOADS_DIR="/var/www/vanilla/uploads"

# Verify uploads directory is writable
TEST_FILE="$UPLOADS_DIR/.health_check"
if touch "$TEST_FILE" 2>/dev/null && rm "$TEST_FILE" 2>/dev/null; then
  curl -s https://vigilmon.online/heartbeat/YOUR_UPLOADS_HEARTBEAT_ID
fi

Schedule every 10 minutes.


Step 7: Monitor Spam Filter Service

Vanilla supports spam filtering via Akismet or similar services. If the spam filter API becomes unavailable, Vanilla may either pass all posts (spam flood risk) or block all posts (community outage) depending on your configuration.

For Akismet, probe the API endpoint:

https://rest.akismet.com/1.1/verify-key

Add an HTTP monitor with expected status 200. Akismet API availability directly controls whether comment spam filtering is functioning.


Step 8: Monitor SSO/OAuth Endpoints

If your Vanilla installation uses SSO (SAML, jsConnect, or OAuth with Google/Facebook/GitHub), an identity provider failure locks out all SSO users. Add monitors for each authentication endpoint:

For jsConnect (Vanilla's custom SSO protocol):

https://sso.yourdomain.com/sso/index.php

For OAuth providers, monitor your identity provider's token endpoint:

https://accounts.google.com/.well-known/openid-configuration

Add HTTP monitors with expected status 200 for each. If you use multiple SSO providers, monitor each — a single provider failure only affects users of that provider.


Step 9: Monitor Background Job Queue

Vanilla 5+ uses a job queue for sending notification digests, rebuilding search indexes, and processing reactions. If the job queue worker stops, notifications stop but no error appears on the front end.

Check if your Vanilla job worker process is running:

#!/bin/bash
# Check if Vanilla's job runner is active
JOB_RUNNER_PID=$(pgrep -f "vanillaJobRunner\|vanilla.*queue" | head -1)

if [ -n "$JOB_RUNNER_PID" ]; then
  curl -s https://vigilmon.online/heartbeat/YOUR_QUEUE_HEARTBEAT_ID
fi

For setups using a system cron to process jobs (Vanilla 3/4), verify the cron last ran recently:

#!/bin/bash
CRON_LOG="/var/log/vanilla-cron.log"

if [ -f "$CRON_LOG" ]; then
  LAST_RUN=$(stat -c %Y "$CRON_LOG")
  NOW=$(date +%s)
  AGE_MINUTES=$(( (NOW - LAST_RUN) / 60 ))
  
  if [ "$AGE_MINUTES" -lt "30" ]; then
    curl -s https://vigilmon.online/heartbeat/YOUR_QUEUE_HEARTBEAT_ID
  fi
fi

Step 10: Configure SSL Certificate Monitoring

HTTPS is essential for community trust — users won't log in or post on a site with a certificate warning.

  1. Open the HTTP monitor for https://community.yourdomain.com (created in Step 1).
  2. Enable Monitor SSL certificate.
  3. Set Alert when certificate expires in less than 21 days.
  4. If you have a CDN or separate domain for assets, add SSL monitoring for that domain too.

Step 11: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
  2. Set Consecutive failures before alert to 2 on the web server monitor — PHP-FPM restarts cause brief 502 windows.
  3. Set consecutive failures to 1 on MySQL TCP monitor — database failures are always emergencies.
  4. Group alerts by severity: database and PHP-FPM to a high-priority channel; search and email to a standard channel.
  5. Add a Maintenance window for planned Vanilla upgrades.

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP web server | /discussions or /health.php | Vanilla UI down | | Cron heartbeat | PHP-FPM status script | Process pool exhaustion | | TCP MySQL | :3306 | Database unavailable | | TCP / HTTP | Sphinx :9312 or ES /cluster/health | Search broken | | Cron heartbeat | Search index age check | Index not being updated | | TCP SMTP | :587 | Email notifications broken | | HTTP CDN asset | Test image URL | File uploads/CDN broken | | HTTP Akismet | API endpoint | Spam filter unavailable | | HTTP SSO | Identity provider URL | Login broken for SSO users | | Cron heartbeat | Job queue process check | Background jobs not running | | SSL certificate | Community domain | Certificate expiry |

A thriving community forum depends on every layer working together — from PHP-FPM serving requests to MySQL storing posts to the job queue delivering notifications. With Vigilmon monitoring each component, your team knows about failures before they become visible to your community members.

Monitor your app with Vigilmon

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

Start free →