DEV Community

Vigilmon
Vigilmon

Posted on

How to Monitor Your Weaviate Vector Search with Vigilmon

How to Monitor Your Weaviate Vector Search with Vigilmon

Weaviate is an open-source vector database with semantic search, hybrid search, and GraphQL querying capabilities. Whether you're running Weaviate Cloud (WCS) or self-hosted, monitoring its availability is essential for any AI application that relies on it for search and retrieval. This guide walks you through setting up Weaviate monitoring with Vigilmon.

Why Monitor Weaviate?

Weaviate instances can fail in several ways:

  • Container crashes on self-hosted Weaviate (OOM kills, disk full)
  • Schema corruption after upgrades or configuration changes
  • Slow imports causing write queue buildup that degrades query performance
  • WCS cluster degradation on Weaviate Cloud during infrastructure events
  • Module failures (text2vec, generative modules) that silently break semantic search

Monitoring Self-Hosted Weaviate

1. Use the Built-in Liveness Endpoint

Weaviate exposes a /v1/.well-known/live endpoint that returns {} with a 200 status when the node is healthy:

In Vigilmon:

  1. Click Add MonitorHTTP(S)
  2. URL: http://your-weaviate-host:8080/v1/.well-known/live
  3. Expected status: 200
  4. Interval: 30 seconds (Weaviate is stateful — check often)
  5. Timeout: 5 seconds

2. Monitor Readiness Separately

The readiness endpoint (/v1/.well-known/ready) indicates whether Weaviate is accepting queries — it returns 503 during startup or when data is loading:

Add a second Vigilmon monitor:

  • URL: http://your-weaviate-host:8080/v1/.well-known/ready
  • Treat consecutive 503s as an alert (not single failures during restarts)

3. Check Cluster Node Health

For multi-node Weaviate clusters:

import requests
from flask import Flask, jsonify

app = Flask(__name__)
WEAVIATE_URL = "http://weaviate:8080"

@app.route("/health/weaviate")
def weaviate_health():
    try:
        # Check nodes
        resp = requests.get(f"{WEAVIATE_URL}/v1/nodes", timeout=5)
        nodes = resp.json().get("nodes", [])

        unhealthy = [n for n in nodes if n.get("status") != "HEALTHY"]
        if unhealthy:
            return jsonify({"status": "degraded", "unhealthy_nodes": len(unhealthy)}), 503

        return jsonify({"status": "ok", "nodes": len(nodes)})
    except Exception as e:
        return jsonify({"status": "error", "message": str(e)}), 503
Enter fullscreen mode Exit fullscreen mode

Monitoring Weaviate Cloud (WCS)

For WCS-managed instances, Weaviate provides a cluster URL. Monitor it directly:

import weaviate
from flask import Flask, jsonify

app = Flask(__name__)

@app.route("/health/weaviate/cloud")
def wcs_health():
    try:
        client = weaviate.connect_to_wcs(
            cluster_url="your-cluster.weaviate.network",
            auth_credentials=weaviate.auth.AuthApiKey("your-api-key"),
        )
        is_ready = client.is_ready()
        client.close()

        if is_ready:
            return jsonify({"status": "ok"})
        return jsonify({"status": "not_ready"}), 503
    except Exception as e:
        return jsonify({"status": "error"}), 503
Enter fullscreen mode Exit fullscreen mode

Add this endpoint to Vigilmon with a 1-minute check interval.

Key Metrics for Weaviate Health

Metric Healthy Value Alert Threshold
Liveness 200 Any non-200
Readiness 200 2+ consecutive 503
Query P95 latency < 100ms > 500ms
Objects indexed Matches expected count Drops unexpectedly

Module Health Monitoring

Weaviate's vectorization modules (OpenAI, Cohere, etc.) can fail independently. Add a query test that uses vectorization:

@app.route("/health/weaviate/search")
def weaviate_search_health():
    try:
        client = weaviate.connect_to_local()
        result = (
            client.query.get("YourClass", ["name"])
            .with_near_text({"concepts": ["health check"]})
            .with_limit(1)
            .do()
        )
        client.close()
        return jsonify({"status": "ok"})
    except Exception as e:
        return jsonify({"status": "error"}), 503
Enter fullscreen mode Exit fullscreen mode

Conclusion

Whether self-hosted or on WCS, Weaviate monitoring with Vigilmon gives you confidence that your semantic search infrastructure is operational. Set up your monitors at vigilmon.online — the liveness endpoint requires zero code changes and takes 2 minutes to configure.

Top comments (0)