How to Monitor Your Meilisearch Instance with Vigilmon
Meilisearch is a fast, typo-tolerant open-source search engine that developers love for its simplicity and performance. Many teams use it to power product search, documentation search, or content search on their applications. But when Meilisearch goes down, your search UI breaks and users get a broken experience without knowing why.
This guide covers how to set up external uptime monitoring for Meilisearch with Vigilmon.
Why Monitor Meilisearch?
Meilisearch runs as a standalone HTTP server (default port 7700). It exposes a health endpoint at /health that returns 200 OK when the instance is ready to serve requests.
External monitoring checks that:
- Meilisearch is running and reachable
- The health endpoint returns
200 - SSL certificates (if using HTTPS) are valid and not expiring
Step 1: Verify Your Health Endpoint
Meilisearch has a built-in /health endpoint:
curl http://localhost:7700/health
# {"status":"available"}
The /health endpoint does not require authentication in Meilisearch — it is designed for external monitoring.
Step 2: Add to Vigilmon
- Log into vigilmon.online
- Click + Add Monitor
- Enter the URL:
https://search.your-app.com/health - Set check interval: 1 minute
- Expected status code: 200
- Expected response body (optional):
available - Click Save
If Meilisearch is behind a reverse proxy (Nginx, Caddy, Traefik), make sure /health is exposed.
Step 3: Nginx Proxy Configuration
server {
listen 443 ssl;
server_name search.your-app.com;
location / {
proxy_pass http://localhost:7700;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Step 4: Application-Level Health Check
Node.js:
const { MeiliSearch } = require("meilisearch");
const client = new MeiliSearch({
host: process.env.MEILI_HOST,
apiKey: process.env.MEILI_MASTER_KEY,
});
app.get("/search-health", async (req, res) => {
try {
const health = await client.health();
res.json({ status: "ok", meilisearch: health.status });
} catch (err) {
res.status(503).json({ status: "error", message: err.message });
}
});
Python:
import meilisearch
from fastapi.responses import JSONResponse
client = meilisearch.Client(
url=settings.MEILI_HOST,
api_key=settings.MEILI_MASTER_KEY
)
@app.get("/search-health")
async def search_health():
try:
health = client.health()
return {"status": "ok", "meilisearch": health["status"]}
except Exception as e:
return JSONResponse(status_code=503, content={"status": "error", "message": str(e)})
Docker Compose Setup with Health Check
version: "3.8"
services:
meilisearch:
image: getmeili/meilisearch:latest
ports:
- "7700:7700"
environment:
MEILI_MASTER_KEY: "${MEILI_MASTER_KEY}"
MEILI_ENV: production
volumes:
- meilisearch_data:/meili_data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
volumes:
meilisearch_data:
What to Monitor
| Monitor | URL | Purpose |
|---|---|---|
| Meilisearch health | /health |
Is the server running? |
| Index availability | /indexes |
Are indexes accessible? |
| App search route | /search-health |
Can the app query Meilisearch? |
Alert Configuration
Set up Vigilmon alerts for:
-
Downtime: Immediate alert when
/healthreturns non-200 - SSL expiry: 14-day warning before your search domain cert expires
- Recovery: Alert when Meilisearch comes back online
Meilisearch's /health endpoint makes external monitoring straightforward. Set up a Vigilmon monitor pointing at it, and you'll get instant alerts when your search breaks.
Vigilmon is a free uptime monitoring tool. Add your Meilisearch health endpoint in under 60 seconds.
Top comments (0)