Avenue Launches Metric-Based Monitors

Avenue is launching support for time-series metrics and metric-based monitors! Currently Avenue monitors operate under the paradigm of “rows”. That is, you can receive an alert when a new row appears in your query results, a row is removed, or some values in the row change. Now, customers will be able to identify a value column in their query results, a timestamp column used to infer the order of data points, specify an aggregation function (e.g. max, min, mean), an evaluation window to aggregate on (e.g. 5 min, 1 hr, 1 day), and a threshold to alert on when breached. The result is a more declarative, more powerful, and less SQL-intensive monitor configuration experience for all Avenue users!


Currently it takes some rather complicated and cumbersome SQL to express a metric-based monitor in Avenue. For example, let’s say we want to send an alert when “there are more than 50 refunds in the last hour”. We would write a SQL query like so:

  • The query will return no rows if there are ≤ 50 refunds in the last hour

  • The query will return 1 row with a timestamp and the refund count if there are > 50 refunds in the last hour

Using this query, we’d set up an hourly alert where the “unique column” is the timestamp. Altogether, arriving at this solution is not very intuitive and requires some strong familiarity with the mechanics of Avenue monitors.


If we wanted to express the same use case using a metric alert, we would write some much simpler SQL:

Then we would:

  • Specify created_at as the timestamp column, and id as the value column

  • Set the aggregation function to count

  • Set the evaluation window to 1 hour

  • Set the monitor threshold to greater than 50

And that’s it! No nested SQL, no complex row added logic! The result is a much more expressive monitor which clearly communicates its purpose and is easy for any operator to modify!

To start creating metric-based monitors today, go to the Create Monitor Form, and to learn more about the different ways to configure metric-based monitors, check out our docs!


What data sources can I use for metric-based monitors?

You can use any data source available on Avenue as long as the table(s) you’re querying have a timestamp column and value to aggregate into a metric!

What types of aggregation functions can I use?

You can use the following aggregation functions:

  • Max

  • Min

  • Mean

  • Count

  • Percentile (p75, p90, p95, etc.)

  • Sum

Which timezone should my timestamp column be in?

Your timestamp column needs to be in UTC time.

If you store your date data in a timezone other than UTC, please convert it to UTC in your query.

Can I use monitor filters with metric monitors?

Yes! Once you have defined your underlying metric monitor query, you can apply any number of monitor filters to the query afterwards. These filters will be applied before the aggregation function is used to compute the metric value for an evaluation interval.

Can I include my metric value in my signal body?

Yes! You can include you metric value, threshold, and comparison operator in your signal body similarly to how you would with row values for event monitors.

Can I use the same metric in multiple monitors?

Yes! You can create standalone metrics at https://app.useavenue.com/metrics and then reference any standalone metric in a metric monitor. This allows you to aggregate and subsequently alert on the same metric in multiple ways.

Where can I learn more about configuring a metric monitor?

Check out https://docs.avenue.so/monitors/metric-monitors for all the details on creating metric monitors. For more info on creating standalone metrics https://docs.avenue.so/features/metrics.

Where can I sign-up?

Get started today