How to Monitor Your Typesense Search Engine with Vigilmon
Typesense is an open-source, typo-tolerant search engine built for speed. It's a popular alternative to Algolia for teams who want fast search without the enterprise price tag. When Typesense goes down, your search experience breaks entirely — autocomplete stops, results disappear, and users bounce.
This guide shows how to set up external uptime monitoring for your Typesense instance with Vigilmon.
The Typesense Health Endpoint
Typesense exposes a built-in health endpoint:
GET http://localhost:8108/health
# {"ok": true}
This endpoint does not require an API key, making it perfect for external monitoring.
Quick Setup with Vigilmon
- Go to vigilmon.online
- Click + Add Monitor
- Enter:
https://search.your-app.com/health - Set check interval: 1 minute
- Expected status: 200
That's it. Vigilmon checks from multiple regions every minute and alerts you instantly if Typesense becomes unavailable.
Docker Compose Setup
version: "3.8"
services:
typesense:
image: typesense/typesense:0.26.0
ports:
- "8108:8108"
environment:
TYPESENSE_DATA_DIR: /data
TYPESENSE_API_KEY: "${TYPESENSE_API_KEY}"
volumes:
- typesense_data:/data
command: --data-dir /data --api-key=${TYPESENSE_API_KEY} --enable-cors
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8108/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
volumes:
typesense_data:
Application-Level Health Check
Node.js:
const Typesense = require("typesense");
const client = new Typesense.Client({
nodes: [{ host: process.env.TYPESENSE_HOST, port: 443, protocol: "https" }],
apiKey: process.env.TYPESENSE_API_KEY,
connectionTimeoutSeconds: 5,
});
app.get("/search-health", async (req, res) => {
try {
const health = await client.health.retrieve();
res.json({ status: "ok", typesense: health });
} catch (err) {
res.status(503).json({ status: "error", message: err.message });
}
});
Python:
import typesense
ts_client = typesense.Client({
"nodes": [{"host": settings.TYPESENSE_HOST, "port": "443", "protocol": "https"}],
"api_key": settings.TYPESENSE_API_KEY,
"connection_timeout_seconds": 5
})
@app.get("/search-health")
async def search_health():
try:
health = ts_client.operations.is_healthy()
return {"status": "ok", "healthy": health}
except Exception as e:
return JSONResponse(status_code=503, content={"status": "error", "message": str(e)})
Nginx Configuration
server {
listen 443 ssl;
server_name search.your-app.com;
# Allow health check without API key
location /health {
proxy_pass http://localhost:8108/health;
proxy_set_header Host $host;
}
location / {
proxy_pass http://localhost:8108;
proxy_set_header Host $host;
}
}
Typesense Cloud Monitoring
If you're using Typesense Cloud, your cluster still has a /health endpoint:
https://xyz.a1.typesense.net/health
Add this directly to Vigilmon for external monitoring independent of the Typesense dashboard.
What to Monitor
| Check | URL | Notes |
|---|---|---|
| Typesense health | GET /health |
Returns {"ok": true}
|
| App search route | GET /search-health |
Verifies app connection |
| SSL certificate | Your domain | Alert 14 days before expiry |
Alert Strategy
- Immediate alert on first failure — search downtime is user-facing
- Slack + email for on-call awareness
- Recovery alert when back online
- SSL expiry warnings 14 days before cert expires
Typesense is built for speed, but reliability requires external visibility.
Vigilmon — free uptime monitoring for Typesense and any HTTP endpoint.
Top comments (0)