Announcing: Saving and Alerting on Composite Metrics — Librato Blog

Announcing: Saving and Alerting on Composite Metrics


Today, we are excited to introduce some amazing updates to our composite metrics feature! Up until now you've been able to add a composite metric directly to any instrument. This was a great way to distill your raw metrics into the precise insights you require, but doing so required you to directly add the query to every instrument you wanted to see the metric on.

Starting today, you can create and save a composite metric under its own name in the metric namespace and then use it everywhere in the UI as a  "native" metric. This new abstraction enables several powerful use-cases:

  1. DRY out your composite metrics with a single, global definition. Any changes to the saved composite metric will be immediately reflected on all instruments referencing it.
  2. Hide complexity by enabling your domain experts to construct arbitrarily complex
    composites of your raw metrics and share  them using metric names that clearly describe the end result. Everyone else in the organization can use them without requiring in-depth knowledge of their formulation.
  3. Alert on composite metrics! Perhaps the most-requested feature since our initial launch of composite metrics, you can set alerts on saved composite metrics just like any other metric. This is an insanely powerful tool in the quest to improve your signal-to-noise ratio and fight alert fatigue.

Current Caveats:

  • Saved composites must result in a single time-series to be alerted on (we're working on relaxing this constraint)
  • Saved composites cannot be nested in other saved composites

Quick Tutorial:

Let's walk through the process of creating/editing/using saved composites with some example screenshots.

Creating a Composite Metric

You can create a new composite metric by navigating to your metrics listing and clicking "Create Composite Metric" in the upper righthand corner.


On the "new composite metric" page, you'll see an empty text field and inactive buttons to "preview" and "save", once you edit a valid composite metric definition you can click the "preview" button to generate a chart displaying the current values:

Screen Shot 2015-01-21 at 2.47.00 PM.png

After examining the preview and making the changes you require, you can click the "save" button:

At this point you'll be asked to provide a unique name for your new composite metric. Choose carefully (as it will reside in the global metric namespace and must be unique) and click "save" in the modal dialog:

Screen Shot 2015-01-21 at 2.59.56 PM.png

Congratulations! You've created a composite metric. You can use the tab on the left to modify metric attributes (a subset of those available on native metrics). There's currently a separate save button on this tab for modifying the attributes. You can also edit/preview/update the composite definition itself, and there's a "revert" button you can use to revert any local changes to the definition:

Note that if you define a dynamic composite (i.e. set a source to '%' in the definition) a "dynamic source" field will appear that you can use to preview the result of the composite with a given set of sources:

Adding a Composite Metric to an Instrument

Adding saved composite metrics to instruments is easy, just search for the name as you would a normal metric and click to add it to the chart:

If the composite definition is dynamic (i.e. includes a source set to '%') it will work the same way a normal "dynamic" stream does and use the value in the dynamic source field:

Alternatively you can use the per-stream source controls to explicitly set the source value that the dynamic composite should always use on this chart:

Setting Alerts on Composite Metrics

In the same way you can easily add composite metrics to an instrument, you can also create alerts on them! Create a new "alert condition" and search for the name of the composite metric you created:

Once selected you can configure all the same threshold options around the value of the saved composite and preview the current threshold against historical data. Note that it is a subset of the options available on native metrics as several options don't apply to composite values (i.e. summary statistic):

Hope you like it!

All of Librato's Composite Metrics functionality is available at no additional cost to our users.  If you're not already using Librato, give it a try for free.