tutorial

Monitoring LANraragi with Vigilmon

LANraragi is a self-hosted manga and comic book server — but a crashed Redis instance or a stalled archive scanner can silently break your entire library. Here's how to monitor every layer with Vigilmon.

LANraragi is a self-hosted manga and comic archive server that handles thousands of CBZ/CBR files, auto-tags them via plugins, and serves them through a clean reader UI. Unlike most self-hosted apps, LANraragi uses Redis as its primary database — not just a cache — meaning a Redis crash doesn't just slow things down, it takes the entire library offline. Vigilmon monitors LANraragi's web server, Redis connectivity, background workers, and archive storage so you catch problems before they corrupt your library metadata.

What You'll Set Up

  • HTTP uptime monitor for the LANraragi web UI (Mojolicious, port 3000)
  • Redis connectivity check (LANraragi's primary database)
  • Admin panel accessibility monitor
  • Archive storage backend health check
  • Background task heartbeat (reindex, thumbnail regeneration)
  • Alert configuration for library health notifications

Prerequisites

  • LANraragi running (Docker or bare-metal, default port 3000)
  • Redis running (default port 6379, managed by LANraragi or external)
  • A free Vigilmon account

Step 1: Monitor the LANraragi Web UI

LANraragi runs a Perl/Mojolicious web server on port 3000. A crash here takes down the reader interface entirely.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. URL: http://YOUR_SERVER_IP:3000.
  4. Check interval: 2 minutes.
  5. Expected HTTP status: 200.
  6. Click Save.

If you've placed LANraragi behind a reverse proxy (nginx, Caddy) with a domain and SSL, use the HTTPS URL instead and enable Monitor SSL certificate with a 21-day expiry alert.


Step 2: Monitor the API Endpoint

LANraragi exposes a REST API at /api. Checking an API endpoint is more meaningful than the root URL because it exercises the Mojolicious routing layer and confirms Redis connectivity simultaneously:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://YOUR_SERVER_IP:3000/api/info.
  3. Check interval: 2 minutes.
  4. Expected HTTP status: 200.
  5. Expected response body contains: name (the response includes "name":"LANraragi").
  6. Click Save.
# Verify manually
curl -s http://YOUR_SERVER_IP:3000/api/info | python3 -m json.tool

If Redis is down, the /api/info endpoint returns an error — making this a combined web server + database health check.


Step 3: Monitor Redis Connectivity

Redis is LANraragi's primary store for archive metadata, reading progress, plugin results, and search indexes. If Redis crashes, LANraragi cannot read or write any archive data.

Add a TCP port monitor for Redis:

  1. Click Add MonitorTCP Port.
  2. Host: YOUR_SERVER_IP (or localhost if on the same machine).
  3. Port: 6379.
  4. Check interval: 1 minute.
  5. Click Save.

For Docker deployments, Redis runs inside the LANraragi container network. Monitor the exposed port if you've mapped it to the host:

# docker-compose.yml excerpt
services:
  lanraragi:
    image: difegue/lanraragi
    ports:
      - "3000:3000"
      - "6379:6379"  # expose Redis for external monitoring

If you don't expose Redis externally, the /api/info check in Step 2 serves as an indirect Redis health check.


Step 4: Monitor the Admin Panel

The LANraragi admin panel (/config) requires authentication and exercises different Mojolicious routes than the reader UI. Monitoring it separately catches routing or session middleware failures:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://YOUR_SERVER_IP:3000/config.
  3. Check interval: 5 minutes.
  4. Expected HTTP status: 200 (or 302 if it redirects to a login page — check what your instance returns).
  5. Click Save.
# Check what status code the admin page returns
curl -s -o /dev/null -w "%{http_code}" http://YOUR_SERVER_IP:3000/config

Step 5: Archive Storage Accessibility Check

LANraragi reads archives from a library directory on disk. If the mount point disappears (NFS timeout, disk failure, Docker volume issue), the server stays up but cannot serve any archive content.

Create a minimal health script on the server that checks storage and pings a Vigilmon heartbeat:

#!/bin/bash
# /usr/local/bin/check_lanraragi_storage.sh
LIBRARY_PATH="/path/to/your/lanraragi/library"

# Check that the library directory is accessible and non-empty
if [ -d "$LIBRARY_PATH" ] && [ "$(ls -A "$LIBRARY_PATH")" ]; then
    curl -s https://vigilmon.online/heartbeat/YOUR_HEARTBEAT_ID
fi

Set up the heartbeat in Vigilmon:

  1. Click Add MonitorCron Heartbeat.
  2. Expected interval: 15 minutes.
  3. Copy the heartbeat URL into the script above.

Schedule the script:

# Add to crontab
*/15 * * * * /usr/local/bin/check_lanraragi_storage.sh

Step 6: Background Task Heartbeat

LANraragi runs background tasks for archive scanning, thumbnail generation, and plugin-based auto-tagging. These run as separate workers and can stall without affecting the web UI.

For Docker deployments, you can check the scan worker status via the API:

#!/bin/bash
# Check if background scan worker is responsive
STATUS=$(curl -s http://localhost:3000/api/search/random?count=1 | \
  python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('recordsFiltered', 0))")

if [ "$STATUS" -ge 0 ] 2>/dev/null; then
    curl -s https://vigilmon.online/heartbeat/YOUR_SEARCH_HEARTBEAT_ID
fi

The /api/search/random endpoint returns results only when the search index is functional. Schedule this every 30 minutes and set the Vigilmon heartbeat interval to 60 minutes to account for indexing pauses on large libraries.


Step 7: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add your preferred channel (Slack, Discord webhook, email, or PagerDuty).
  2. For the Redis TCP monitor, set Consecutive failures before alert to 1 — Redis downtime has immediate library-wide impact.
  3. For the web UI monitor, set the threshold to 2 — Mojolicious can take a few seconds to restart under load.
  4. For the storage heartbeat, use the default threshold — a missed heartbeat means the library directory is inaccessible.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web UI | http://SERVER:3000 | Mojolicious crash, server down | | API endpoint | http://SERVER:3000/api/info | App + Redis combined health | | Redis TCP | SERVER:6379 | Primary database down | | Admin panel | http://SERVER:3000/config | Auth middleware failure | | Storage heartbeat | Heartbeat URL | Library directory unmounted | | Search heartbeat | Heartbeat URL | Background index worker stalled |

LANraragi keeps your manga library organized and accessible — Vigilmon keeps LANraragi running so your collection stays available whenever you want to read.

Monitor your app with Vigilmon

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

Start free →