> ## Documentation index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Ask it with GET https://upstash.com/docs/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash.com/docs/common/help/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash.com/docs/feedback?path=/docs/redis/howto/monitoryourusage&helpful=true` (or `false`) records whether this page helped. An optional `comment` (URL-encoded, at most 500 characters) says what was missing or wrong. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Monitor your usage

We support the Redis `MONITOR` command, a debugging command that allows you to see all requests processed by your Redis instance in real-time.

## Monitoring Your Usage - Video Guide

In this video, we'll walk through setting up a monitor instance step-by-step.

<Frame>
  <iframe
    id="intro-video"
    width="560"
    height="315"
    src="https://www.youtube.com/embed/tWIm396WAkI?rel=0&disablekb=1"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; fullscreen; clipboard-write; encrypted-media; gyroscope"
    allowfullscreen
  ></iframe>
</Frame>

<Note>
  The `MONITOR`command expects a persistent connection and, therefore, does not work over HTTP. 
</Note>

In this video, we use `ioredis` to connect to our Upstash Redis database. Using an event handler, we can define what should happen for each executed command against on Redis instance. For example, logging all data to the console.

<RequestExample>
```ts Example
const monitor = await redis.monitor()

monitor.on("monitor", (time, args, source, database) => {
  console.log(time, args, source, database)
})
```
</RequestExample>
