tutorial

How to Monitor Apache Samoa with Vigilmon (Uptime, APIs, and Alerts)

Apache Samoa (Scalable Advanced Massive Online Analysis) is a distributed streaming machine learning framework that runs on top of Apache Storm, S4, and Apac...

Apache Samoa (Scalable Advanced Massive Online Analysis) is a distributed streaming machine learning framework that runs on top of Apache Storm, S4, and Apache Flink. Samoa provides a platform-independent API for building online machine learning algorithms — classifiers, regressors, and clusterers that learn incrementally from unbounded data streams without ever materializing the full dataset.

When your Samoa topology loses a Storm supervisor, incoming training examples are dropped and the model silently stops learning. When the underlying streaming platform fails, the entire online learning pipeline stalls — and because Samoa's models update in real time, even a brief outage means your model drifts away from the current data distribution. This tutorial shows you how to set up uptime monitoring for Apache Samoa deployments using Vigilmon — free tier, no credit card.


Why Samoa deployments need external monitoring

Samoa adds monitoring surface area at every layer of the streaming ML stack:

  • Topology submission failures — if the Storm Nimbus node goes down, no new Samoa topologies can be submitted and existing topologies lose their ability to rebalance after worker failures
  • Worker node crashes — Samoa's Processing Items (PIs) run inside Storm spouts and bolts; a dead worker silently drops tuples unless Storm's guaranteed message processing is configured correctly
  • Model serving outages — if you export Samoa-trained models to a REST API for inference, that serving process can crash independently of the underlying Samoa topology
  • Backpressure and queue saturation — when a downstream bolt in the Samoa topology processes too slowly, upstream queues fill and tuples are dropped; there is no built-in alert for this condition
  • Flink job manager failures — if you run Samoa on Flink, a Job Manager crash causes the entire topology to fail even though individual Task Managers remain alive

External monitoring from Vigilmon gives you real-time visibility across all these layers.


What you'll need

  • A running Apache Samoa topology on Storm, Flink, or S4
  • Access to the underlying streaming platform's web UI or REST API
  • A free Vigilmon account (sign up takes 30 seconds)

Step 1: Expose health endpoints for your Samoa stack

Samoa itself does not ship HTTP endpoints, but the platforms it runs on do. Verify these are accessible:

# Storm Nimbus / UI (indicates topology health)
curl http://storm-ui.example.com:8080/api/v1/cluster/summary

# Flink Job Manager REST API
curl http://flink-jobmanager.example.com:8081/overview

# Your model-serving REST API (if applicable)
curl http://samoa-model-server.example.com:5000/health

Add a dedicated health endpoint to your model-serving layer. If you export Samoa models via a Flask wrapper:

from flask import Flask, jsonify
import time, threading

app = Flask(__name__)

# Updated by the model update thread whenever Samoa pushes a new model version
_model_state = {"last_update_ts": time.time(), "version": 0}

@app.get("/health")
def health():
    staleness = time.time() - _model_state["last_update_ts"]
    if staleness > 300:  # model hasn't updated in 5 minutes — topology likely stalled
        return jsonify({
            "status": "degraded",
            "model_version": _model_state["version"],
            "seconds_since_update": staleness
        }), 503
    return jsonify({
        "status": "ok",
        "model_version": _model_state["version"],
        "seconds_since_update": staleness
    }), 200

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5000)

For Docker deployments:

services:
  samoa-model-server:
    image: your-org/samoa-model-server:latest
    ports:
      - "5000:5000"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s
    restart: unless-stopped

Step 2: Monitor the Storm UI (if running Samoa on Storm)

The Storm UI REST API exposes cluster health as JSON — use it as your primary Storm health signal:

  1. Log in to vigilmon.online and go to Monitors → New Monitor
  2. Choose HTTP / HTTPS as the type
  3. URL: http://storm-ui.example.com:8080/api/v1/cluster/summary
  4. Set check interval to 1 minute
  5. Under Expected response, configure:
    • Status code: 200
    • Response body contains: "slotsTotal"
  6. Save the monitor

If the Storm UI goes down, you lose all topology visibility — this monitor fires before operational impact reaches your Samoa models.


Step 3: Monitor the Flink Job Manager (if running Samoa on Flink)

  1. Go to Monitors → New Monitor
  2. Choose HTTP / HTTPS
  3. URL: http://flink-jobmanager.example.com:8081/overview
  4. Expected status: 200
  5. Response body contains: "taskmanagers"
  6. Save the monitor

A Flink Job Manager failure takes down all running Samoa topologies. This monitor catches the failure within one check interval.


Step 4: Set up HTTP monitoring for the model-serving API

  1. Go to Monitors → New Monitor
  2. Choose HTTP / HTTPS
  3. URL: https://samoa-model-server.example.com/health
  4. Expected status: 200
  5. Response body contains: "status":"ok"
  6. Save the monitor

The degraded response with 503 fires an incident when the Samoa topology stalls and the model stops updating — catching a class of failure that infrastructure monitors miss.


Step 5: Add TCP port monitoring for the streaming platform

TCP checks on the platform's key ports give you an early warning before the HTTP layer fails:

For Storm:

  1. Go to Monitors → New Monitor
  2. Choose TCP Port
  3. Host: storm-nimbus.example.com, Port: 6627
  4. Save the monitor

For Flink:

  1. Repeat for host flink-jobmanager.example.com, port 6123

| Service | Default port | |---------|-------------| | Storm Nimbus (Thrift) | 6627 | | Storm UI | 8080 | | Flink Job Manager REST | 8081 | | Flink RPC | 6123 | | Kafka (common data source) | 9092 | | Zookeeper | 2181 |


Step 6: Configure webhook alerts

Samoa topology failures cascade quickly — once Storm drops tuples, the model diverges from current data and prediction quality degrades in ways that are hard to detect without ML-specific metrics. Get alerted the moment Vigilmon detects infrastructure failure.

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

Example alert payload from Vigilmon:

{
  "monitor_name": "Storm UI Cluster Summary",
  "status": "down",
  "url": "http://storm-ui.example.com:8080/api/v1/cluster/summary",
  "started_at": "2026-05-20T03:14:00Z",
  "duration_seconds": 180
}

Separate alert channels for ML engineers (model serving alerts) and platform engineers (Storm/Flink infrastructure alerts) ensure the right runbooks reach the right people.


Step 7: Create a status page for your streaming ML platform

If data science and product teams depend on Samoa-powered predictions, give them a status page:

  1. Go to Status Pages → New Status Page
  2. Name it (e.g. "Streaming ML Platform Status")
  3. Add all your monitors — model server HTTP, Storm UI, Flink overview, TCP checks
  4. Publish the page

Share the URL with data consumers so they know where to check before opening incident tickets.


Monitor coverage summary

| Monitor | Type | What it catches | |---------|------|-----------------| | https://samoa-model-server.example.com/health | HTTP | Model server crash, topology stall | | http://storm-ui.example.com:8080/api/v1/cluster/summary | HTTP | Storm cluster failure | | http://flink-jobmanager.example.com:8081/overview | HTTP | Flink Job Manager failure | | storm-nimbus.example.com:6627 | TCP | Storm Nimbus unreachable | | flink-jobmanager.example.com:6123 | TCP | Flink RPC port loss | | kafka-broker.example.com:9092 | TCP | Data source unavailable |


What's next

  • Heartbeat monitors — if you run periodic Samoa topology resubmission scripts, ping a Vigilmon heartbeat on each successful submission so you know when automated redeployment silently stops working
  • SSL certificate monitoring — Vigilmon tracks TLS expiry across all your HTTPS endpoints, including model-serving APIs

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 →