tutorial

How to Monitor Apache Marvin-AI with Vigilmon (Uptime, APIs, and Alerts)

Apache Marvin-AI is an open-source platform for building, training, and deploying machine learning models at scale. It provides a standardized workflow — fro...

Apache Marvin-AI is an open-source platform for building, training, and deploying machine learning models at scale. It provides a standardized workflow — from data acquisition through model training to prediction serving — wrapped in a Python-native toolchain with a built-in REST engine for exposing model predictions as HTTP services.

When your Marvin-AI prediction engine goes down, production applications silently fall back to stale predictions or return errors to end users. When the training pipeline stalls, models stop updating and drift from production reality. This tutorial shows you how to set up uptime monitoring for Apache Marvin-AI deployments using Vigilmon — free tier, no credit card.


Why Marvin-AI deployments need external monitoring

Marvin-AI prediction services fail in ways that internal health checks miss:

  • Engine process crashes — the Marvin engine server can OOM-kill under heavy inference load and restart silently, dropping in-flight requests
  • Model load failures — a redeployed model can fail to load (serialization mismatch, missing dependency) while the engine process stays up and returns 500 on every prediction
  • Dependency API failures — if your Marvin model calls external APIs (feature stores, data enrichment endpoints) and those go down, prediction quality degrades without a hard failure
  • gRPC vs HTTP split — Marvin exposes both HTTP and gRPC endpoints; monitoring only one leaves the other unverified

External monitoring from Vigilmon gives you an independent view of what users actually experience.


What you'll need

  • A running Marvin-AI engine server (default REST port is 8000 in the examples)
  • A free Vigilmon account (sign up takes 30 seconds)

Step 1: Expose a health endpoint on your Marvin engine

Marvin-AI's engine server exposes action endpoints for each step in your pipeline. Add a dedicated health route to your Marvin project to make monitoring straightforward:

# marvin_server_extension.py — add to your Marvin project
from flask import Flask, jsonify
import time

# Assuming you hook into Marvin's Flask-based engine server
def register_health_endpoint(app: Flask):
    @app.route("/health", methods=["GET"])
    def health():
        return jsonify({"status": "ok", "timestamp": time.time()}), 200

Alternatively, if you run Marvin's engine server directly, check that the default prediction endpoint responds:

# Marvin engine server health check
curl -X POST http://marvin.example.com:8000/predictor/predict \
  -H "Content-Type: application/json" \
  -d '{"input_message": {}}'

# A healthy response (even with empty input validation errors)
# confirms the engine is running and the model is loaded

For Docker deployments, expose the port and add a health check:

services:
  marvin-engine:
    image: your-org/marvin-engine:latest
    ports:
      - "8000:8000"
    command: ["marvin", "engine", "start", "--host", "0.0.0.0", "--port", "8000"]
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    restart: unless-stopped

Step 2: Set up HTTP monitoring in Vigilmon

  1. Log in to vigilmon.online and go to Monitors → New Monitor
  2. Choose HTTP / HTTPS as the type
  3. URL: https://marvin.example.com/health
  4. Set check interval to 1 minute
  5. Under Expected response, configure:
    • Status code: 200
    • Response body contains: "status":"ok"
  6. Save the monitor

Vigilmon now probes your Marvin engine from multiple regions every minute. Any non-200 response or timeout triggers an incident and fires your configured alert channels.


Step 3: Monitor the prediction endpoint directly

A health endpoint tells you the server is running. Monitoring the prediction endpoint directly tells you the model is loaded and responding:

  1. Go to Monitors → New Monitor
  2. Choose HTTP / HTTPS
  3. Method: POST
  4. URL: https://marvin.example.com/predictor/predict
  5. Request body: {"input_message": {}}
  6. Expected status: 200 (or 400 if you expect validation errors on empty input — any non-500 response confirms the model is loaded)
  7. Response time threshold: 5 seconds

This deeper check catches model load failures that a simple health ping misses.


Step 4: Add TCP port monitoring

If your Marvin deployment also exposes a gRPC port or connects to a feature store over a non-HTTP port, add TCP monitors for those:

For a gRPC prediction port:

  1. Go to Monitors → New Monitor
  2. Choose TCP Port
  3. Host: marvin.example.com, Port: 50051
  4. Save the monitor

For a Redis feature cache:

  1. Repeat for host redis.example.com, port 6379

These TCP checks ensure the full inference path — not just the HTTP surface — stays reachable.


Step 5: Configure webhook alerts

Every second of prediction engine downtime translates to degraded user experience. Get alerted the moment Vigilmon detects a problem.

  1. Go to Alert Channels → Add Channel → Webhook
  2. Enter your Slack, PagerDuty, or Teams webhook URL
  3. Assign the channel to all your Marvin monitors

Example alert payload from Vigilmon:

{
  "monitor_name": "Marvin Engine /health",
  "status": "down",
  "url": "https://marvin.example.com/health",
  "started_at": "2026-04-02T11:30:00Z",
  "duration_seconds": 180
}

Set up a second, lower-urgency alert channel (email or a non-paging Slack channel) for the prediction endpoint response-time alerts so you catch degradation before full failure.


Step 6: Create a status page for your ML services

If your Marvin prediction APIs serve internal teams or external customers, give them a self-service status page:

  1. Go to Status Pages → New Status Page
  2. Name it (e.g. "Prediction API Status")
  3. Add your monitors — Marvin health, prediction endpoint, Redis TCP
  4. Publish the page

You get a public URL at https://status.vigilmon.online/your-page. Share it with API consumers so they can check status themselves instead of opening support tickets.


Monitor coverage summary

| Monitor | Type | What it catches | |---------|------|-----------------| | https://marvin.example.com/health | HTTP | Engine process crash, server startup failure | | https://marvin.example.com/predictor/predict | HTTP (POST) | Model load failure, inference errors | | marvin.example.com:50051 | TCP | gRPC endpoint unreachable | | redis.example.com:6379 | TCP | Feature cache loss |


What's next

  • Heartbeat monitors — configure your Marvin training pipelines to ping a Vigilmon heartbeat URL when training completes; if the heartbeat stops, you know the pipeline silently died
  • SSL certificate monitoring — Vigilmon tracks TLS expiry on all your HTTPS endpoints and alerts you before certificates lapse

Get started free at vigilmon.online — no credit card, monitors start running in under a minute.

Monitor your app with Vigilmon

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

Start free →