Metrics now includes Alerting. Alerts can be fired in two ways, in real-time as conditions are evaluated against the incoming metric data, and also in a query-based way against data already persisted. The real-time approach tends to look for violations based on the most recent metric data being reported, the query approach, an 'external alerter', focuses on aggregated data over time; the queries and conditions are defined as expressions that are parsed and executed. For example:
metric:10:avgd( X > 1.1 ), 30
So, for metricId X, if the average value for the last 30 minutes is > 10% the average for the same 30 minute period yesterday, the condition is true. Evaluate every 10 minutes.
We need to make this more robust by supporting more than just single metricIds, adding the ability to target tags and therefore apply the test to sets of metricIds.
This could have ramifications not only on the current expression syntax, but possibly Alerting's external alerter core feature.
I'll update this Jira with thoughts about the design.
Stefan Negrea Note that the Metrics external alerter lacks formal documentation, I think, even though it is packaged in the product. At the moment I think this design doc  is the best doc. We should likely make it more formal somewhere,