# Daily Upstash Redis spend and usage digest posted to Slack

> Every weekday morning, see what your Upstash Redis databases cost yesterday, which ones spiked, and why, without opening a dashboard.

- Workflow type: agent
- Services: Upstash, Slack Bot
- Categories: Engineering, Operations
- Published: 2026-08-10

## What it does

- Adds up what every Redis database in your Upstash account cost yesterday and leads with the account total.
- Ranks your databases by spend so the top three cost drivers are always at the top of the message.
- Compares each database against its own recent days and calls out sharp jumps in cost or traffic, explaining the likely cause in plain language such as a read spike or a drop in cache hits.
- Flags when a usage based database has grown expensive enough that a fixed monthly plan would probably save money, and posts it all as one short Slack message.

## What you'll need

- An Upstash account with at least one serverless Redis database.
- A management key from your Upstash account settings, so the workflow can read your databases and their usage.
- A Slack workspace and a channel where the digest should be posted.
- The Slack bot added to that channel.

## Prompt

Every weekday at 8am, give me a digest of what my Upstash serverless Redis fleet cost yesterday and how hard it is being used, and post it to Slack.

Start with the Upstash List Redis Databases operation to enumerate every database in the account. Always enumerate rather than working from a fixed list, so databases added since the last run get picked up automatically.

For each database returned, call Get Redis Database Stats. Pull the daily figures: dailybilling for what it cost, dailyrequests and daily_net_commands for command volume, daily_read_requests and daily_write_requests for the read versus write split, and current_storage for how much data it is holding. Also keep the time series arrays that come back, including hits, misses, keyspace and diskusage, because those carry the trailing days you need for the comparison.

Rank the databases by yesterday's dailybilling, highest first, and sum them for a total account spend figure for the day.

Then compare each database against its own trailing days in the returned time series rather than against the rest of the fleet, since a small cache and a busy primary are not comparable. Call out anything that moved materially, for example daily billing or command volume more than 50 percent above that database's own trailing average.

For every anomaly, give a short plain explanation of the likely driver based on what the numbers actually show. A jump in daily_read_requests with flat writes points to a read spike or a runaway loop. A rising misses series against flat or falling hits points to a cache miss regression, where keys are expiring or being evicted and traffic is falling through to the origin. Growth in current_storage or the diskusage series points to storage growth rather than traffic. Say which one it looks like and why, do not just report that a number went up.

Post the result to Slack with the Slack Bot Send a Message operation. Lead with total account spend for the day, then the top three spenders with their daily cost and request volume, then an anomalies section, and close with a right sizing note.

For the right sizing note, flag any pay as you go database that is consistently expensive enough that a fixed plan would be cheaper. Upstash pay as you go bills roughly $0.20 per 100k commands plus storage, and sustained volume above roughly 500k commands per day is the point where a fixed plan usually wins. Treat this as a recommendation only. You can mention that Change Redis Database Plan is the operation that would apply it, but never change a plan automatically.

Keep the whole message short enough to read in the channel without expanding it. A few lines per section, real numbers rather than prose, and skip the anomalies section entirely when nothing crossed the threshold. If a stats call fails for one database, note it in a single line and still report on the rest.

## How to customize

- Change the timing. Every weekday at 8am is the default, but you can run it seven days a week or push it later to line up with your team's standup.
- Change where it lands. Point it at a different channel, or send it as a direct message to whoever owns the infrastructure budget.
- Tune the sensitivity. The 50 percent jump threshold for anomalies and the point at which a fixed plan gets suggested can both be raised or lowered.

## FAQ

### Can this see the data stored inside my Redis databases?

No. It only reads account level usage and billing information such as daily cost, request counts, and storage size. It never reads the keys or values inside a database.

### Will it change my database plan automatically?

No. When a database looks like it would be cheaper on a fixed plan, the digest says so as a recommendation. Any actual plan change is left for you to make deliberately.

### What if I only have one database?

It still works. You get yesterday's cost, how heavily the database was used, and an alert whenever something jumps compared to its own recent history.

### Do I need to store any history for the comparisons to work?

No. Upstash returns recent history alongside the current numbers, so the trend comparison happens inside the workflow with nothing to set up or maintain.

### Why post it in the morning instead of alerting the moment something spikes?

Usage based billing adds up over a day rather than breaking anything outright, so a short morning digest catches a cost problem while it is still one day old and keeps the channel quiet the rest of the time.

Use this prompt in General Input: https://www.generalinput.com/prompts/daily-upstash-redis-spend-and-usage-digest-posted-to-slack