How do I count events?

Librato supports distributed counting, meaning you can send us multiple measurements of 1 (or more) from wherever a count is incremented (even the same process), and we’ll aggregate them up to a per-interval count at the end of the period.

To enable this behavior, have each agent submit a measurement with the same name and tag set and then turn on service-side aggregation (SSA) for the metric.

Set the aggregation function for the metric to “sum” and you will get the sum of the count of the events.

image0

How do I cumulatively count events?

A cumulatiave count / cumulative sum is useful for metrics that you want to see change over a long period of time. This can be useful for tracking the total amount of actions ever happened in your application. e.g. Total Users Signed up, Vists to a webpage, Total Twitter Mentions.

To view a metric as a cumulative count you’ll need to create a composite metric using the integrate function.

integrate(sum(s("twitter.mentions", {"host": "*"}, { period:"60", function:"sum" })))