tutorial

How to Monitor Vectara with Vigilmon

Vectara is an enterprise RAG-as-a-service platform providing grounded generation, hybrid search, and SOC2-compliant deployments. Here's how to monitor your Vectara-powered applications and get alerts when your RAG pipeline fails.

Vectara is an enterprise-grade retrieval-augmented generation (RAG) platform that handles the full RAG stack — document ingestion, vector indexing, hybrid search, and grounded generation — as a managed service. Teams use it to build production RAG applications without running their own vector infrastructure. When your application depends on Vectara for semantic search and document Q&A, you need uptime monitoring to catch corpus ingestion failures, query API degradation, and SSL issues before users experience broken search. Vigilmon gives you HTTP health checks, cron heartbeats for ingestion pipelines, and instant alerts so your Vectara-powered features stay reliably available.

What You'll Set Up

  • HTTP uptime monitor for your Vectara query API health endpoint
  • Cron heartbeat for scheduled document ingestion pipelines
  • Status page monitor for Vectara service incidents
  • Alert channels for on-call notification

Prerequisites

  • A Vectara account with at least one corpus created
  • A Vectara API key (query or index key from the Vectara console)
  • A service that wraps Vectara queries (FastAPI, Express, or similar)
  • A free Vigilmon account

Step 1: Add a Health Endpoint to Your Vectara-Powered Service

Vectara's query API is external, but your application wraps it in a service layer. Add a /health endpoint that probes the Vectara corpus to verify end-to-end connectivity:

import os
import httpx
from fastapi import FastAPI
from fastapi.responses import JSONResponse

app = FastAPI()

VECTARA_CUSTOMER_ID = os.environ["VECTARA_CUSTOMER_ID"]
VECTARA_CORPUS_ID = os.environ["VECTARA_CORPUS_ID"]
VECTARA_API_KEY = os.environ["VECTARA_API_KEY"]

@app.get("/health")
async def health():
    """Lightweight health check — does not call Vectara."""
    return {"status": "ok", "service": "vectara-rag"}

@app.get("/health/deep")
async def deep_health():
    """Deep health check — verifies Vectara corpus is reachable."""
    url = f"https://api.vectara.io/v1/query"
    headers = {
        "x-api-key": VECTARA_API_KEY,
        "customer-id": VECTARA_CUSTOMER_ID,
        "Content-Type": "application/json",
    }
    payload = {
        "query": [
            {
                "query": "health check",
                "numResults": 1,
                "corpusKey": [{"customerId": VECTARA_CUSTOMER_ID, "corpusId": int(VECTARA_CORPUS_ID)}],
            }
        ]
    }

    try:
        async with httpx.AsyncClient(timeout=8.0) as client:
            resp = await client.post(url, headers=headers, json=payload)
            resp.raise_for_status()
            return {"status": "ok", "vectara_reachable": True}
    except Exception as e:
        return JSONResponse(
            status_code=503,
            content={"status": "error", "detail": str(e)},
        )

Use /health for fast 1-minute Vigilmon probes and /health/deep for less frequent 5-minute checks that validate the Vectara corpus is queryable.


Step 2: Monitor Your RAG API Endpoint

With the health endpoint deployed, add a Vigilmon monitor:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your service's health URL: https://api.yourdomain.com/health
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Add a Keyword check: "ok" to confirm the response body is valid.
  7. Click Save.

For the deep Vectara probe (which makes a real corpus query):

  1. Add a second monitor pointing to https://api.yourdomain.com/health/deep.
  2. Set Check interval to 5 minutes — this calls the Vectara API and you want to avoid unnecessary query quota consumption.
  3. Set Response timeout to 12 seconds (Vectara query latency can be higher for large corpora).

Step 3: Heartbeat Monitoring for Document Ingestion Pipelines

Vectara ingestion pipelines — crawlers, ETL jobs, or nightly document uploads — are batch processes with no persistent HTTP listener. Set up a cron heartbeat in Vigilmon:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to match your ingestion schedule (e.g. 1440 minutes for a daily job).
  3. Copy the heartbeat URL.

Ping the heartbeat after each successful ingestion run:

import os
import httpx
from vectara import VectaraClient  # or use the REST API directly

VIGILMON_HEARTBEAT_URL = os.environ["VIGILMON_HEARTBEAT_URL"]

async def run_nightly_ingestion(documents: list[dict]):
    client = VectaraClient(
        api_key=os.environ["VECTARA_API_KEY"],
        customer_id=os.environ["VECTARA_CUSTOMER_ID"],
    )

    corpus_id = int(os.environ["VECTARA_CORPUS_ID"])

    for doc in documents:
        client.index.upload_document(corpus_id=corpus_id, document=doc)

    # Signal successful ingestion to Vigilmon
    async with httpx.AsyncClient() as http:
        await http.get(VIGILMON_HEARTBEAT_URL, timeout=5)
    print(f"Ingested {len(documents)} documents and pinged heartbeat.")

If the ingestion job raises an exception before the heartbeat ping, Vigilmon alerts you after the expected interval passes without a signal.


Step 4: Monitor the Vectara Status Page

Vectara publishes service status for API incidents. Set up a status page monitor so you know about provider-side outages before your users report broken search:

  1. In Vigilmon, click Add MonitorHTTP / HTTPS.
  2. URL: https://status.vectara.com
  3. Keyword check: All Systems Operational
  4. Check interval: 5 minutes
  5. Click Save.

When Vectara posts an incident, the keyword will no longer match and Vigilmon alerts your team — often before the status page update itself has propagated.


Step 5: SSL Certificate Monitoring

Vectara's API uses mutual TLS authentication and your service endpoint must also maintain a valid certificate. Add SSL monitoring for your RAG API:

  1. Open the HTTP monitor created in Step 2.
  2. Enable Monitor SSL certificate under the SSL section.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

Expired certificates break Vectara client connections and HTTPS queries silently from the server's perspective — Vigilmon catches it before your users see TLS handshake errors.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
  2. Set Consecutive failures before alert to 2 — Vectara's API can have transient latency spikes on large corpora that self-resolve within one check interval.
  3. Route the deep health monitor to a higher-severity channel than the lightweight check, since a failing corpus query means your RAG pipeline is genuinely broken.

Use the Vigilmon API to suppress alerts during planned corpus re-indexing:

curl -X POST https://vigilmon.online/api/maintenance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"monitor_id": "abc123", "duration_minutes": 30}'

# Trigger corpus re-index
python reindex_corpus.py

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP endpoint | /health | Service crash, startup failure | | Deep health check | /health/deep | Vectara corpus unreachable, API key invalid | | Cron heartbeat | Heartbeat URL | Ingestion pipeline crash, missed schedule | | Status page | status.vectara.com | Vectara provider-side incidents | | SSL certificate | API domain | Certificate expiry |

Vectara removes the operational burden of managing vector infrastructure — Vigilmon ensures your RAG application's availability is monitored just as rigorously as its underlying managed service. With health checks on every query endpoint and heartbeats on every ingestion pipeline, you'll know the moment your enterprise search goes dark.

Monitor your app with Vigilmon

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

Start free →