How to Monitor Your Upstash Redis and Kafka with Vigilmon
Upstash is a serverless Redis and Kafka service widely used in Next.js, edge functions, and serverless architectures. Since Upstash usage is billed per request and has rate limits on free plans, failures can be silent — your app returns errors but no alarm fires. Vigilmon gives you HTTP-level monitoring for your Upstash databases.
What Can Fail with Upstash?
-
Database URL token rotated — requests return
401 -
Request quota exceeded — daily/monthly limit hit, returns
429 -
Database deleted — returns
404or connection error - Region-specific outage — Upstash cluster in one region is degraded
- QStash delivery failures — scheduled messages stop running
Monitoring Upstash Redis via REST API
Upstash Redis exposes a REST API you can query without a Redis client:
https://{DATABASE_HOST}/ping
With your REST token:
curl https://YOUR_DATABASE_URL.upstash.io/ping \
-H 'Authorization: Bearer YOUR_REST_TOKEN'
Expected response: "+PONG\r\n"
Vigilmon setup:
- URL:
https://YOUR_DATABASE_URL.upstash.io/ping - Header:
Authorization: Bearer YOUR_REST_TOKEN - Expected status:
200 - Keyword:
PONG - Interval: 5 minutes
Testing Key Operations
Beyond ping, test a read/write cycle:
GET https://YOUR_DB.upstash.io/set/vigilmon_health/ok
GET https://YOUR_DB.upstash.io/get/vigilmon_health
Expected: {"result": "OK"} and {"result": "ok"}
This catches cases where the database is up but writes are failing.
Monitoring Upstash Kafka via REST API
Upstash Kafka also exposes a REST API:
curl https://YOUR_KAFKA_URL.upstash.io/info \
-H 'Upstash-Email: your@email.com' \
-H 'Upstash-Password: YOUR_REST_PASSWORD'
Expected: 200 OK with cluster info JSON.
Vigilmon setup:
- URL:
https://YOUR_KAFKA_URL.upstash.io/info - Headers:
Upstash-Email: your@email.comUpstash-Password: YOUR_REST_PASSWORD
- Expected status:
200 - Keyword:
"cluster-id"or"broker-count" - Interval: 5 minutes
Monitoring QStash (Upstash Message Queue)
QStash schedules and delivers HTTP messages (cron jobs, delayed tasks). Monitor the QStash API:
curl https://qstash.upstash.io/v2/schedules \
-H 'Authorization: Bearer YOUR_QSTASH_TOKEN'
This lists your active schedules. A 200 response confirms QStash API is reachable and your token is valid.
Vigilmon setup for QStash:
- URL:
https://qstash.upstash.io/v2/schedules - Header:
Authorization: Bearer YOUR_QSTASH_TOKEN - Expected status:
200 - Keyword:
"scheduleId"(or just verify 200) - Interval: 10 minutes (QStash issues tend to be gradual, not sudden)
Monitoring Your QStash Receiver
QStash delivers messages to your endpoint. If your receiver is down, QStash retries, but eventually gives up. Monitor your receiver:
https://yourapp.com/api/qstash/handler
Expect 200 (or 405 for GET if it only accepts POST — adjust expected status accordingly).
Alert Configuration
For Upstash Redis (session store, rate limiting, caching):
- 1 failure → immediate Slack alert
- 3 consecutive → page on-call
- Reason: lost Redis = lost sessions, broken rate limits
For Upstash Kafka (event streaming):
- 2–3 failures → Slack alert
- More tolerant since events may be buffered
For QStash (scheduled jobs):
- Monitor the scheduled job outcome via your app's health endpoint, not just QStash API
- 1 failure on receiver → alert immediately
Monitoring Upstash's Status
https://status.upstash.com/api/v2/status.json
Add this as a keyword monitor checking for "All Systems Operational" or absence of incidents.
Summary
| Monitor | Endpoint | What It Catches |
|---|---|---|
| Redis PING | /ping |
Database unreachable, bad token |
| Redis Write | /set/key/value |
Write operations failing |
| Kafka Info | /info |
Kafka cluster down |
| QStash API | /v2/schedules |
Queue management API down |
| QStash Receiver | Your app URL | Message delivery endpoint down |
Monitor your Upstash databases on Vigilmon — free plan, no credit card needed.
Vigilmon — uptime monitoring with multi-region HTTP checks and instant alerts.
Top comments (0)