Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use statsd when graphite's Carbon aggregator can do the same job?

I have been exploring the Graphite graphing tool for showing metrics from multiple servers, and it seems that the 'recommended' way is to send all metrics data to StatsD first. StatsD aggregates the data and sends it to graphite (or rather, Carbon).

In my case, I want to do simple aggregations like sum and average on metrics across servers and plot that in graphite. Graphite comes with a Carbon aggregator which can do this.

StatsD does not even provide aggregation of the kind I am talking about.

My question is - should I use statsd at all for my use case? Anything I am missing here?

like image 775
talonx Avatar asked Dec 04 '12 06:12

talonx


People also ask

Why StatsD?

StatsD allows you to capture different types of metrics depending on your needs: today those are Gauges, Counters, Timing Summary Statistics, and Sets. This can be as simple as adding a decorator to methods you want to time, or a one-liner to track a gauge value.

What is StatsD and collectd?

Collectd can be used for infrastructure and application monitoring where there is no need to implement any special logic for collecting metrics. StatsD is used more for application monitoring. You can send custom metrics based on set intervals. The common metrics include gauges, counts, sets, and intervals.

What is graphite StatsD?

StatsD is a network daemon that runs on the Node. js platform. It listens for statistics such as counters and timers sent via UDP, performs aggregation of this data, then sends it on to a configurable backend service - such as Hosted Graphite.


1 Answers

  1. StatsD operates over UDP, which removes the risk of carbon-aggregator.py being slow to respond and introducing latency in your application. In other words, loose coupling.

  2. StatsD supports sampling of inbound metrics, which is useful when you don't want your aggregator to take 100% of all data points to compute descriptive statistics. For high-volume code sections, it is common to use 0.5%-1% sample rates so as to not overload StatsD.

  3. StatsD has broad client-side support.

like image 171
Alexis Lê-Quôc Avatar answered Oct 19 '22 22:10

Alexis Lê-Quôc