statsd is a server for aggregating counters and other metrics to ship to graphite.
The general idea is that you send statsd count or latency data and every few seconds it will emit the aggregated values to graphite (aggregates like average, max, stddev, etc)
You can learn about statsd here:
A simple example usage of this is to count HTTP hits by response code; to learn more about that, check out the log metrics tutorial
output {
statsd {
count => ... # hash (optional), default: {}
debug => ... # boolean (optional)
decrement => ... # array (optional), default: []
host => ... # string (optional), default: "localhost"
increment => ... # array (optional), default: []
namespace => ... # string (optional), default: "logstash"
port => ... # number (optional), default: 8125
sample_rate => ... # number (optional), default: 1
sender => ... # string (optional), default: "%{@source_host}"
tags => ... # array (optional), default: []
timing => ... # hash (optional), default: {}
type => ... # string (optional), default: ""
}
}
A count metric. metric_name => count as hash
The final metric sent to statsd will look like the following (assuming defaults) logstash.sender.file_name
Enable debugging output?
A decrement metric. metric names as array.
The address of the Statsd server.
An increment metric. metric names as array.
The statsd namespace to use for this metric
The port to connect to on your statsd server.
The sample rate for the metric
The name of the sender. Dots will be replaced with underscores
Only handle events with all of these tags. Note that if you specify a type, the event must also match that type. Optional.
A timing metric. metric_name => duration as hash
The type to act on. If a type is given, then this output will only act on messages with the same type. See any input plugin's "type" attribute for more. Optional.