Docs » Integrations Guide » Use the Smart Agent » Monitors » collectd/statsd

collectd/statsd 🔗

Monitor Type: collectd/statsd (Source)

Accepts Endpoints: No

Multiple Instances Allowed: No

Overview 🔗

The StatsD plugin for collectd listens for StatsD events, aggregates them and transmits them according to collectd’s configuration. Use this plugin to send data from StatsD to SignalFx statsd plugin.

SignalFx supports Counter, Timer and Gauge types which are dispatched as the collectd types - derive, latency and gauge respectively. In SignalFx, for a statsd metric, its collectd type is attached as a prefix to the metric name. As an example, if you send in the gauge -

$ echo "statsd.test:1|g" | nc -w 1 -u 127.0.0.1 8125

This will be reported to SignalFx as “gauge.statsd.test”

USAGE 🔗

Adding dimensions to StatsD metrics 🔗

Add dimensions to your metrics by adding key-value pairs to your StatsD metric names as follows:

$ echo "statsd.[foo=bar,dim=val]test:1|g" | nc -w 1 -u 127.0.0.1 8125

This creates a metric called statsd.test of type gauge, with dimensions foo=bar and dim=val.

Delete[Type]s boolean setting 🔗

These options control what happens if metrics are not updated in an interval. If set to False, the default, metrics are dispatched unchanged, i.e. the rate of counters and size of sets will be zero, timers report NaN and gauges are unchanged. If set to True, the such metrics are not dispatched and removed from the internal cache.

SignalFx’s default configuration for this plugin sets all Delete[Type]s configuration options to True. We strongly recommend this in order to ensure that metrics that have stopped reporting are not reported as 0 in perpetuity. Setting these parameters to False results in collectd’s memory usage increasing over time, as the set of metrics reported from StatsD grows indefinitely. This is especially important in environments that are long-running or whose metrics change frequently.

CounterSum boolean setting 🔗

When enabled, creates a count metric which reports the change since the last read. This option primarily exists for compatibility with the statsd implementation by Etsy.

If you are only looking at the counts generated by each reporting interval, equivalent to Counters in SignalFx then we’d recommend that you set CounterSum to True. It will send in an additional counter metric with a prefix of count.

Sample YAML configuration:

monitors:
 - type: collectd/statsd
   listenAddress: "0.0.0.0"
   listenPort: 8125
   deleteSets: true
   timerPercentile: 90.0

Configuration 🔗

To activate this monitor in the Smart Agent, add the following to your agent config:

monitors:  # All monitor config goes under this key
 - type: collectd/statsd
   ...  # Additional config

For a list of monitor options that are common to all monitors, see Common Configuration.

Config option Required Type Description
listenAddress no string The host/address on which to bind the UDP listener that accepts statsd datagrams (default: localhost)
listenPort no integer The port on which to listen for statsd messages (default: 8125)
deleteSets no bool (default: false)
deleteCounters no bool (default: false)
deleteTimers no bool (default: false)
deleteGauges no bool (default: false)
timerPercentile no float64 (default: 0)
timerUpper no bool (default: false)
timerCount no bool (default: false)
timerSum no bool (default: false)
timerLower no bool (default: false)
counterSum no bool (default: false)

The agent does not do any built-in filtering of metrics coming out of this monitor.