tutorial

Monitoring Mylar3 with Vigilmon: Uptime & Health Alerts for Your Comic Book Downloader

How to monitor a self-hosted Mylar3 automated comic book downloader with Vigilmon — using the API version health check, HTTP monitors, downloader connectivity checks, and SSL certificate alerts.

Mylar3 is a self-hosted, automated comic book downloader that works with NZB and torrent clients to fetch issues from your pull list as they're released. It integrates with NZBget, SABnzbd, and qBittorrent, fetches metadata from ComicVine, and keeps your digital comic collection current without manual effort. But when Mylar3 silently stops working — because its downloader client connection drops, a metadata provider goes offline, or the process crashes — issues pile up undownloaded with no indication anything is wrong. Vigilmon gives you external monitoring that watches Mylar3 from the outside and alerts you before you notice the gap in your collection.

What You'll Build

  • A Vigilmon HTTP monitor on Mylar3's API version health check
  • A keyword assertion to confirm the API is genuinely responding
  • Downloader and metadata provider connectivity verification via heartbeats
  • SSL certificate alerts for proxied deployments

Prerequisites

  • A running Mylar3 instance (default port: 8090)
  • A reverse proxy (Caddy or Nginx) with HTTPS — required for Vigilmon monitors
  • A free account at vigilmon.online

Step 1: Verify the API Health Check

Mylar3 exposes its API at /api with various cmd parameters. The getVersion command is a lightweight health check that requires no authentication by default and exercises the Python backend:

curl "http://localhost:8090/api?cmd=getVersion"

A healthy Mylar3 returns HTTP 200 with a JSON response containing version information:

{"data": {"installed_version": "...", "latest_version": "..."}, "result": "success"}

If Mylar3 is down or its internal API has errored, you'll receive a connection refused error or a non-200 response.

HTTPS first: Vigilmon monitors require HTTPS. Proxy Mylar3 with Caddy:

mylar3.yourdomain.com {
  reverse_proxy localhost:8090
}

Step 2: Create a Vigilmon HTTP Monitor

  1. Log in to VigilmonAdd Monitor → HTTP.
  2. URL: https://mylar3.yourdomain.com/api?cmd=getVersion.
  3. Check interval: 5 minutes (Mylar3's Python backend can be briefly slow during indexer searches).
  4. Response timeout: 15 seconds.
  5. Expected status: 200.
  6. Click Save.

Vigilmon now probes your Mylar3 API health endpoint every 5 minutes from an external network. If the server stops responding, you'll receive an alert within 5–10 minutes.


Step 3: Add a Keyword Assertion

A 200 response code alone doesn't confirm Mylar3 is functioning correctly. The API key may be invalid, or the backend may return an error JSON with a 200 status. Add a keyword assertion:

In the monitor settings, add a Keyword assertion:

  • Keyword: success
  • Keyword must be present: yes

This catches cases where Mylar3 returns a 200 status but with "result": "error" in the body — indicating a backend issue even though the HTTP layer is responding.


Step 4: Monitor Downloader Connectivity with Heartbeats

Mylar3's core function is downloading — and it depends on an external downloader (NZBget, SABnzbd, or qBittorrent). If the connection between Mylar3 and its downloader breaks, new issues queue up but never download. This is the failure mode most likely to go unnoticed.

Create a Heartbeat monitor in Vigilmon:

  1. Add Monitor → Heartbeat.
  2. Expected interval: 1 hour.
  3. Grace period: 30 minutes.
  4. Copy the heartbeat URL.

Add a server-side check script:

#!/bin/bash
# /usr/local/bin/mylar3-health-check.sh
# Calls Mylar3 API to verify downloader connectivity, then pings heartbeat

MYLAR_URL="https://mylar3.yourdomain.com"
API_KEY="YOUR-MYLAR3-API-KEY"
HEARTBEAT_URL="https://vigilmon.online/api/heartbeat/YOUR-HEARTBEAT-ID"

STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
  "${MYLAR_URL}/api?apikey=${API_KEY}&cmd=getVersion")

if [ "$STATUS" = "200" ]; then
  curl -fsS -X POST "$HEARTBEAT_URL"
fi

Add to cron:

# /etc/cron.d/mylar3-heartbeat
0 * * * * root /usr/local/bin/mylar3-health-check.sh

If Mylar3 stops responding to authenticated API calls — which happens when the Python process has partially crashed or a dependency has broken — the heartbeat stops and Vigilmon alerts you.


Step 5: Monitor Comic Metadata Provider Availability

Mylar3 relies on ComicVine (and optionally other metadata providers) to identify and match comic issues. If ComicVine is temporarily unavailable or your API key has expired, Mylar3 can't add new series or match unidentified issues.

Add a monitor for ComicVine's API availability:

  1. Add Monitor → HTTP.
  2. URL: https://comicvine.gamespot.com/api/ (the ComicVine API root — adjust to the exact endpoint Mylar3 uses).
  3. Expected status: 200.
  4. Check interval: 15 minutes.

This monitor is external to your infrastructure — it confirms whether ComicVine itself is up, which helps distinguish "Mylar3 is broken" from "ComicVine is down" when your downloads stall.


Step 6: Monitor SSL Certificate Expiry

Mylar3's web UI over HTTPS means an expired certificate locks you out of the management interface entirely. Vigilmon automatically monitors the SSL certificate of any HTTPS monitor URL.

In your existing HTTP monitor settings:

  • SSL certificate alert: enable it.
  • Alert days before expiry: 14 days.

This is a backstop for when Caddy or Certbot auto-renewal fails silently due to firewall rules, expired Let's Encrypt rate limits, or misconfigured domain DNS.


Step 7: Configure Alerting

In Vigilmon under Settings → Notifications, configure your channels:

| Trigger | Action | |---|---| | getVersion API non-200 | Email — check systemctl status mylar3 | | Response timeout (> 15 s) | Email — Mylar3 may be in a long indexer search; restart if persistent | | "success" keyword missing | Email — API error; check Mylar3 logs for Python exceptions | | Heartbeat missed | Email — downloader connection or Mylar3 backend issue | | SSL expiry < 14 days | Email — renew certificate before lockout |

Alert after: 2 consecutive failures for the API check (Mylar3 can be briefly slow during indexer searches).

Re-notify: every 60 minutes — missing comic downloads are not urgent but should be resolved within the day.


Keeping Mylar3 Running with systemd

# /etc/systemd/system/mylar3.service
[Unit]
Description=Mylar3 Comic Downloader
After=network.target

[Service]
Type=simple
User=mylar3
WorkingDirectory=/opt/mylar3
ExecStart=/usr/bin/python3 /opt/mylar3/mylar/mylar.py --datadir=/opt/mylar3/data
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
sudo systemctl enable --now mylar3

What Vigilmon Catches That Mylar3 Logs Miss

| Scenario | Mylar3 logs | Vigilmon | |---|---|---| | Python process crash, restart fails | Crash logged, then silent | HTTP monitor fires within 5–10 min | | NZBget connection refused | Error per download attempt | Heartbeat stops arriving | | ComicVine API down | Error on metadata lookups | Separate ComicVine monitor fires | | SSL certificate expires | Not monitored | Certificate expiry alert fires | | Reverse proxy misconfiguration | Not in Mylar3 logs | Keyword assertion catches it |


Mylar3 is a set-and-forget tool — which makes silent failures especially costly. Issues release on a schedule; if Mylar3 misses them, you may not notice for weeks. Vigilmon's external monitoring ensures you know within minutes when something breaks.

Start monitoring your Mylar3 instance in under 5 minutes — register free at vigilmon.online.

Monitor your app with Vigilmon

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

Start free →