tutorial

Monitoring Manyfold 3D Model Library with Vigilmon

Manyfold is a self-hosted 3D model library for makers, but Sidekiq job failures and storage issues are invisible until your models stop processing. Here's how to monitor the web server, PostgreSQL, Sidekiq, Redis, and S3 storage with Vigilmon.

Manyfold is a self-hosted alternative to Printables and Thingiverse — a Ruby on Rails application that lets makers, 3D printing enthusiasts, and designers manage their STL/3MF model libraries. It runs on port 3214, stores model metadata in PostgreSQL, processes model files and generates thumbnails with Sidekiq background workers, uses Redis as a job queue broker, and stores model files on local disk or S3-compatible storage. When Sidekiq stops or Redis goes down, uploaded models stop processing silently — no thumbnails, no file analysis, no search indexing. Vigilmon monitors each component so you catch failures before your library starts filling up with unprocessed uploads.

What You'll Set Up

  • Web server availability monitor (port 3214)
  • PostgreSQL database connectivity heartbeat
  • Sidekiq background worker health heartbeat
  • Redis queue broker connectivity heartbeat
  • S3/local storage backend accessibility check
  • Model file upload endpoint response time monitor
  • Search index health heartbeat (MeiliSearch or Elasticsearch)
  • SMTP email delivery heartbeat

Prerequisites

  • Manyfold running on port 3214 (Docker Compose or bare metal)
  • PostgreSQL, Redis, and Sidekiq running
  • A free Vigilmon account

Step 1: Monitor Web Server Availability

Manyfold's Rails server is the primary interface for all library browsing and model uploads. Monitor it directly:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. URL: https://manyfold.yourdomain.com/ (or http://your-server-ip:3214/ if not behind a proxy).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

If Manyfold has a health endpoint (Rails 8+ applications often include /up), use it:

https://manyfold.yourdomain.com/up

This endpoint returns 200 OK when Rails, the database connection, and critical dependencies are healthy.


Step 2: Monitor TLS Certificate Expiry

If you proxy Manyfold behind nginx or Caddy with HTTPS termination, monitor the certificate:

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

Step 3: Monitor PostgreSQL Connectivity

All model metadata, user accounts, collection structure, and job state live in PostgreSQL. A database failure means the entire Manyfold UI returns 500 errors.

#!/bin/bash
# /usr/local/bin/manyfold-pg-check.sh
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_PG_HEARTBEAT_ID"

# For Docker Compose installations
if docker compose -f /opt/manyfold/docker-compose.yml exec -T db \
    pg_isready -U manyfold > /dev/null 2>&1; then
    curl -s "$HEARTBEAT_URL"
fi

For bare-metal installations:

#!/bin/bash
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_PG_HEARTBEAT_ID"

if pg_isready -h localhost -U manyfold > /dev/null 2>&1; then
    curl -s "$HEARTBEAT_URL"
fi
chmod +x /usr/local/bin/manyfold-pg-check.sh

Create the Vigilmon heartbeat:

  1. Click Add MonitorCron Heartbeat.
  2. Set the expected interval to 2 minutes.
  3. Copy the heartbeat URL into the script.

Schedule:

# /etc/cron.d/manyfold-pg-check
*/2 * * * * root /usr/local/bin/manyfold-pg-check.sh

Step 4: Monitor Sidekiq Background Workers

Sidekiq processes all model file operations in Manyfold: STL/3MF parsing, thumbnail generation, storage integrity checks, and search indexing. When Sidekiq is down, uploads succeed (files are stored) but nothing gets processed — no thumbnails, no metadata extraction, no search entries.

Option A: Sidekiq Web UI Check

If Sidekiq Web UI is mounted in Manyfold (common in Rails apps), monitor it:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: https://manyfold.yourdomain.com/sidekiq (or whatever path it's mounted at — check config/routes.rb).
  3. Set Expected HTTP status to 200 (or 302 if it redirects to login).
  4. Set Check interval to 2 minutes.
  5. Click Save.

Option B: Sidekiq Queue Depth Heartbeat

A running Sidekiq process with a growing queue backlog is also a problem. Monitor that the queue isn't growing unboundedly:

#!/bin/bash
# /usr/local/bin/manyfold-sidekiq-check.sh
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_SIDEKIQ_HEARTBEAT_ID"
MAX_QUEUE_SIZE=500

# Check Sidekiq process is running
if ! pgrep -f "sidekiq" > /dev/null; then
    exit 1
fi

# Check queue depth via Redis
QUEUE_SIZE=$(redis-cli -n 0 llen "queue:default" 2>/dev/null || echo "0")

if [ "$QUEUE_SIZE" -lt "$MAX_QUEUE_SIZE" ]; then
    curl -s "$HEARTBEAT_URL"
fi

For Docker Compose:

#!/bin/bash
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_SIDEKIQ_HEARTBEAT_ID"

# Check worker container is running
if docker compose -f /opt/manyfold/docker-compose.yml ps worker | grep -q "Up"; then
    curl -s "$HEARTBEAT_URL"
fi
chmod +x /usr/local/bin/manyfold-sidekiq-check.sh

Schedule every 2 minutes:

*/2 * * * * root /usr/local/bin/manyfold-sidekiq-check.sh

Step 5: Monitor Redis Queue Broker

Redis is the message broker between Rails (which enqueues jobs) and Sidekiq (which processes them). Without Redis, no new jobs can be enqueued — model uploads stall immediately.

#!/bin/bash
# /usr/local/bin/manyfold-redis-check.sh
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_REDIS_HEARTBEAT_ID"

# For Docker Compose
if docker compose -f /opt/manyfold/docker-compose.yml exec -T redis \
    redis-cli ping 2>/dev/null | grep -q "PONG"; then
    curl -s "$HEARTBEAT_URL"
fi

For bare-metal Redis:

if redis-cli ping | grep -q "PONG"; then
    curl -s "$HEARTBEAT_URL"
fi

Schedule every 2 minutes:

*/2 * * * * root /usr/local/bin/manyfold-redis-check.sh

Step 6: Monitor Storage Backend Accessibility

Manyfold stores 3D model files and generated thumbnail images on local disk or S3-compatible storage. A full disk or lost S3 credentials means new uploads fail and existing files become unreachable.

Local Storage Check

#!/bin/bash
# /usr/local/bin/manyfold-storage-check.sh
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_STORAGE_HEARTBEAT_ID"
STORAGE_PATH="/opt/manyfold/storage"
MIN_FREE_GB=5

FREE_GB=$(df -BG "$STORAGE_PATH" | awk 'NR==2 {print $4}' | tr -d 'G')

if [ "$FREE_GB" -ge "$MIN_FREE_GB" ] && [ -w "$STORAGE_PATH" ]; then
    curl -s "$HEARTBEAT_URL"
fi

S3 Storage Check

If using an S3-compatible backend (MinIO, AWS S3, Backblaze B2):

#!/bin/bash
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_STORAGE_HEARTBEAT_ID"
S3_BUCKET="manyfold-storage"

# Test read access to the bucket
if aws s3 ls "s3://$S3_BUCKET/" --max-items 1 > /dev/null 2>&1; then
    curl -s "$HEARTBEAT_URL"
fi

Create a Vigilmon heartbeat with a 5 minute interval and schedule accordingly.


Step 7: Monitor the Model Upload Endpoint

The model upload endpoint is the most user-visible operation. Monitor its response time with an authenticated probe:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: https://manyfold.yourdomain.com/models/new (or the models listing page).
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

This checks that Rails can serve the upload form, which requires a database connection and session state.


Step 8: Monitor MeiliSearch or Elasticsearch (If Configured)

Manyfold supports search indexing via MeiliSearch or Elasticsearch. If the search index goes down, model search returns no results or errors.

MeiliSearch Health Check

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://localhost:7700/health (MeiliSearch default port).
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

MeiliSearch returns {"status":"available"} on the health endpoint when running correctly.

Elasticsearch Health Check

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://localhost:9200/_cluster/health.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

Step 9: Heartbeat for Scheduled Storage Integrity Checks

Manyfold can run periodic storage integrity checks to detect orphaned files or missing attachments. Add a heartbeat to confirm these jobs run:

#!/bin/bash
# /usr/local/bin/manyfold-integrity-check.sh
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_INTEGRITY_HEARTBEAT_ID"
COMPOSE_FILE="/opt/manyfold/docker-compose.yml"

# Trigger integrity check via Rails runner
if docker compose -f "$COMPOSE_FILE" exec -T web \
    bundle exec rails manyfold:storage:check > /dev/null 2>&1; then
    curl -s "$HEARTBEAT_URL"
fi

Schedule weekly:

0 4 * * 0 root /usr/local/bin/manyfold-integrity-check.sh

Create a Vigilmon heartbeat with a 7 day interval.


Step 10: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
  2. For the web server monitor, set Consecutive failures before alert to 2 — Rails may take a few seconds to restart after a deploy.
  3. For Sidekiq and Redis heartbeats, set Consecutive failures before alert to 1 — a processing backlog grows quickly.
  4. For storage monitors, set Consecutive failures before alert to 2 to avoid alerts during brief S3 latency spikes.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web server | https://manyfold.yourdomain.com/ | Rails down, app crash | | TLS certificate | HTTPS endpoint | Certificate expiry | | PostgreSQL heartbeat | pg_isready | DB down, connection pool exhausted | | Sidekiq heartbeat | Worker container / queue depth | Model processing stalled | | Redis heartbeat | redis-cli ping | Job queue unavailable | | Storage heartbeat | Local disk or S3 bucket | Disk full, lost credentials | | Upload endpoint | /models/new200 | Upload form broken | | MeiliSearch | /health200 | Search index down | | Integrity check | Scheduled Rails task | Storage corruption undetected |

Manyfold's value is in its background processing pipeline — parsing 3D model files, generating preview thumbnails, and building the search index. When Sidekiq stops or Redis goes offline, that pipeline stalls silently while the web UI continues to accept uploads. Vigilmon's heartbeat monitoring detects these silent failures within minutes, so your model library stays healthy and your uploads keep processing.

Monitor your app with Vigilmon

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

Start free →