tutorial

Monitoring Perplexica with Vigilmon

Perplexica is an open-source AI search engine that combines SearXNG metasearch with LLM responses — but any one of its layered services can fail silently. Here's how to monitor Perplexica's web app, SearXNG backend, LLM API, and search pipeline with Vigilmon.

Perplexica is an open-source AI-powered search engine that chains together a Next.js frontend, SearXNG metasearch backend, and an LLM API (Ollama or OpenAI-compatible) to deliver conversational web research. Because it stitches together several independently-hosted services, a failure in any single layer — SearXNG going down, an Ollama model crash, or an embedding service timeout — silently degrades the search experience. Vigilmon gives you end-to-end monitoring across every component of your Perplexica stack.

What You'll Set Up

  • Web application availability monitoring on port 3000
  • SearXNG metasearch backend connectivity checks
  • LLM API integration health monitoring (Ollama or OpenAI-compatible)
  • Search result embedding service health
  • Focus mode endpoint health
  • Database query performance monitoring
  • Web scraper service monitoring
  • Search index health monitoring

Prerequisites

  • Perplexica deployed with Docker Compose or manually, accessible on port 3000
  • SearXNG running on its configured port (default 4000 in Perplexica's Docker Compose)
  • An LLM backend (Ollama on port 11434, or an OpenAI-compatible API)
  • A free Vigilmon account

Step 1: Monitor the Perplexica Web Application

Perplexica's Next.js frontend is the entry point for all search queries. Monitor its availability first.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Perplexica URL: https://search.yourdomain.com
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Enable Response body keyword check and require Perplexica in the response to verify the correct application is serving.
  7. Click Save.

If Perplexica is running behind a reverse proxy (nginx, Caddy, Traefik), also monitor the Next.js health endpoint directly:

https://search.yourdomain.com/api/health

If Perplexica doesn't expose a /api/health route by default, you can check the root page — a 200 with the application's HTML is sufficient for basic availability monitoring.


Step 2: SearXNG Metasearch Backend Connectivity

Perplexica delegates web search to SearXNG. Without SearXNG, the AI gets no search results to reason over. Monitor SearXNG directly:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://searxng.yourdomain.com:4000/ (or whatever host/port your SearXNG runs on).
  3. Set Expected HTTP status to 200.
  4. Enable Response body keyword check and require SearXNG in the response.
  5. Set Check interval to 1 minute.
  6. Click Save.

For a more precise health check, monitor the SearXNG search API directly:

http://searxng.yourdomain.com:4000/search?q=test&format=json

A valid JSON response with a results array confirms SearXNG can reach its configured search engines. Set Expected HTTP status to 200 and use a body keyword check for "results".

If SearXNG is internal-only (not exposed to the public internet), use a TCP port monitor instead:

  1. Click Add MonitorTCP Port.
  2. Enter your SearXNG host and port 4000.
  3. This verifies the container is running and accepting connections.

Step 3: LLM API Integration Health

Perplexica's AI responses depend on an LLM API — typically Ollama running locally or an OpenAI-compatible endpoint. Monitor it independently of Perplexica:

Ollama:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://ollama.yourdomain.com:11434/api/tags
  3. Set Expected HTTP status to 200.
  4. Enable Response body keyword check and require "models" in the response to verify at least one model is loaded.
  5. Set Check interval to 2 minutes.

The /api/tags endpoint lists available models without triggering an inference, making it a lightweight health probe. If your Perplexica is configured to use a specific model, verify it appears in the response:

{
  "models": [
    { "name": "mistral:latest", "size": 4109854976 }
  ]
}

OpenAI-compatible API (LiteLLM, LocalAI, etc.):

  1. Add an HTTP monitor for https://your-llm-api.yourdomain.com/v1/models.
  2. Set Expected HTTP status to 200.
  3. Require "data" in the response body (OpenAI format: {"data":[{"id":"model-name"}]}).

Step 4: Search Result Embedding Service

Perplexica uses an embedding model to vectorize search results and find the most relevant passages for the LLM to reason over. The embedding service runs as part of Ollama or a separate embedding API.

Monitor the embedding model availability:

  1. Add a cron heartbeat monitor to track successful embedding operations.
  2. In your Perplexica environment, add a lightweight embedding health-check script:
#!/bin/bash
# Check that the embedding model responds to a small input
RESPONSE=$(curl -s -X POST http://ollama.yourdomain.com:11434/api/embeddings \
  -H 'Content-Type: application/json' \
  -d '{"model":"nomic-embed-text","prompt":"health check"}')

if echo "$RESPONSE" | grep -q '"embedding"'; then
  curl -s https://vigilmon.online/heartbeat/YOUR_HEARTBEAT_ID
fi
  1. Schedule this script every 5 minutes via cron.
  2. Set the heartbeat interval to 6 minutes to catch a missed cycle.

If the embedding model is unloaded or Ollama runs out of memory to serve it, the heartbeat stops and Vigilmon alerts.


Step 5: Focus Mode Endpoint Health

Perplexica's focus modes (Web, Academic, YouTube, Reddit, etc.) route queries through different SearXNG engines and prompts. Each focus mode is exposed as an API endpoint. Monitor critical ones:

  1. Add an HTTP monitor for Perplexica's chat API endpoint:
    https://search.yourdomain.com/api/chat
    
  2. Set Method to POST.
  3. Set Expected HTTP status to 200.
  4. Under Request body, use a minimal payload:
    {
      "optimizationMode": "speed",
      "focusMode": "webSearch",
      "query": "ping",
      "history": []
    }
    
  5. Set Content-Type header to application/json.

Note: this sends a real search query. Use a benign query like "ping" or "test" and set the check interval to 5 minutes to avoid excessive API calls to SearXNG and your LLM.


Step 6: Database Query Performance

Perplexica stores chat history and configuration in a database. Monitor database query performance via your health endpoint:

Add a health endpoint to Perplexica's backend (if you've customized the deployment):

// In your Perplexica backend (if you have a custom server)
app.get('/api/health/db', async (req, res) => {
  const start = Date.now();
  try {
    // Perform a lightweight read
    await db.query('SELECT 1');
    res.json({
      status: 'ok',
      latency_ms: Date.now() - start
    });
  } catch (err) {
    res.status(503).json({ status: 'error', message: err.message });
  }
});

Monitor the endpoint in Vigilmon:

  1. URL: https://search.yourdomain.com/api/health/db
  2. Enable Response time alerting with a threshold of 500ms.
  3. Set Expected HTTP status to 200.

Step 7: Web Scraper Service

Perplexica scrapes web pages to extract content for the LLM context window. The scraper uses Cheerio (or a headless browser for JavaScript-heavy pages). Monitor scraper health with a cron heartbeat:

#!/bin/bash
# Test that the scraper can fetch a known stable URL
RESPONSE=$(curl -s "https://search.yourdomain.com/api/scrape" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}')

if echo "$RESPONSE" | grep -q '"content"'; then
  curl -s https://vigilmon.online/heartbeat/YOUR_SCRAPER_HEARTBEAT_ID
fi

Run this every 10 minutes. If the scraper hangs, returns an error, or the application restarts without recovering the scraper module, the heartbeat stops.


Step 8: Search Index Health

If your Perplexica deployment uses a vector store or local search index for cached results, monitor its health:

For deployments using a local vector database (e.g., a Chroma or Qdrant sidecar):

Add a TCP port monitor:

  1. Click Add MonitorTCP Port.
  2. Chroma default port: 8000; Qdrant default port: 6333.
  3. Set Check interval to 1 minute.

For Qdrant with a REST API:

  1. Add an HTTP monitor for http://qdrant.yourdomain.com:6333/healthz.
  2. Set Expected HTTP status to 200.
  3. Body keyword check: require "ok" in the response.

Step 9: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and connect Slack, email, or webhook.
  2. Group monitors by layer in Vigilmon's labels:
    • perplexica-core: web app and chat API
    • perplexica-backend: SearXNG and LLM API
    • perplexica-infra: database and vector store
  3. Set Consecutive failures before alert to 2 for all monitors — brief startup delays are common after container restarts.
  4. Route perplexica-backend alerts to a developer channel with higher urgency, since SearXNG and LLM failures affect all queries immediately.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web application | / or /api/health | Next.js frontend crash | | SearXNG backend | SearXNG root or /search?format=json | Metasearch layer down | | LLM API (Ollama) | /api/tags | Model unloaded, Ollama crashed | | LLM API (OpenAI-compat) | /v1/models | API endpoint unreachable | | Embedding service | Cron heartbeat via embedding test | Embedding model failure | | Focus mode / chat API | POST /api/chat | End-to-end query pipeline failure | | Database | /api/health/db | Chat history storage failure | | Web scraper | Cron heartbeat via scrape test | Scraper module crash | | Vector store | TCP or HTTP health endpoint | Cached search index unavailable |

Perplexica's power comes from chaining multiple services together — which also means there are multiple points where it can silently degrade. With Vigilmon monitoring each layer from the Next.js frontend through SearXNG, the LLM API, and the embedding service, you get the observability needed to diagnose and fix failures before your users notice degraded search quality.

Monitor your app with Vigilmon

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

Start free →