Documentation forAppOptics

StatsD

Overview

This integration collects metrics from StatsD. StatsD is a network daemon that runs on the Node.js platform and listens for statistics, like counters and timers, sent over UDP or TCP and sends aggregates to one or more pluggable backend services. It was originally developed as a front-end proxy for the Graphite/Carbon metrics server.

This integration is currently available for Windows and Linux platforms.

This integration was updated to V2 plugin framework. If you are still using depreciated way of configuring it, please refer to old documentation.

Setup

The statsd monitoring is accomplished by bridge plugin which is included with the SolarWinds Snap Agent by default. Please follow the directions below to enable it for a agent instance. The bridge plugin utilize Telegraf StatsD plugin.

Prerequisites

You do not need to start up and configure the StatsD daemon beforehand. Once the statsd plugin is enabled, the listener will automatically start (default port 8125).

Configuration

The statsd monitoring is accomplished by bridge plugin which is included with the SolarWinds Snap Agent by default. Please follow the directions below to enable it for a agent instance.

  1. Make a copy of the StatsD example task file task-bridge-statsd.yaml.example, renaming it to task-bridge-statsd.yaml:

    On Windows, using Explorer or PowerShell:

    Copy
    > copy "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-statsd.yaml.example" "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-statsd.yaml"

    On Linux using command line:

    Copy
    $ sudo cp /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-statsd.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-statsd.yaml
  2. Edit the task file to customize settings for the StatsD listener service, for example:

    Copy
    ---
    version: 2

    schedule:
      type: cron
      interval: "0 * * * * *"
      
    plugins:
      - plugin_name: bridge
      
        config:
          statsd:
            ## Protocol, must be "tcp" or "udp" (default=udp)
            protocol: "udp"
            
            ## MaxTCPConnection - applicable when protocol is set to tcp (default=250)
            # max_tcp_connections: 250
            
            ## Enable TCP keep alive probes (default=false)
            # tcp_keep_alive: false
            
            ## Specifies the keep-alive period for an active network connection.
            ## Only applies to TCP sockets and will be ignored if tcp_keep_alive is false.
            ## Defaults to the OS configuration.
            # tcp_keep_alive_period: "2h"
            
            ## Address and port to host UDP listener on (default=":8125")
            service_address: ":8125"
            
            ## The following configuration options control when the plugin clears its cache
            ## of previous values. If set to false, then the plugin will only clear its
            ## cache when the daemon is restarted.
            
            ## Reset gauges every interval (default=true)
            # delete_gauges: true
            
            ## Reset counters every interval (default=true)
            # delete_counters: true
            
            ## Reset sets every interval (default=true)
            # delete_sets: true
            
            ## Reset timings & histograms every interval (default=true)
            # delete_timings: true
            
            ## Percentiles to calculate for timing & histogram stats
            # percentiles:
            #   - 50
            #   - 90
            #   - 95
            #   - 99
            
            ## separator to use between elements of a statsd metric (default="_")
            # metric_separator: "_"
            
            ## Parses tags in the datadog statsd format (default=false)
            # parse_data_dog_tags: false
            
            ## Parses extensions to statsd in the datadog statsd format
            ## currently supports metrics and datadog tags.
            ## http://docs.datadoghq.com/guides/dogstatsd/
            # datadog_extensions: false
            
            ## Templates specify rules for translating metric names into tagged metrics. For more details:
            ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#graphite
            # templates:
            #   - cpu.* measurement*
            
            ## Number of UDP messages allowed to queue up, once filled,
            ## the statsd server will start dropping packets (default=10000)
            # allowed_pending_messages: 10000
            
            ## Number of timing/histogram values to track per-measurement in the
            ## calculation of percentiles. Raising this limit increases the accuracy
            ## of percentiles but also increases the memory usage and cpu time. (default=1000)
            # percentile_limit: 1000
            
            ## Maximum socket buffer size in bytes, once the buffer fills up, metrics
            ## will start dropping.  Defaults to the OS default.
            # read_buffer_size: 65535
            
            ## Metric name prefix
            # bridge_prefix: "statsd"
            
            # Report min, max, sum, count, stddev as a single measurement to the publisher
            bridge_use_json_fields: true
            
        publish:
          - plugin_name: publisher-appoptics
  3. Restart the agent:

    On Windows command line:

    Copy
    > net stop swisnapd
    > net start swisnapd

    On Linux command line:

    Copy
    $ sudo service swisnapd restart
  4. Enable the StatsD integration in AppOptics

    On the Integrations Page you will see StatsD integration available if the previous steps were successful. It may take a couple minutes before the StatsD integration is identified. Select the StatsD integration to open the configuration menu in the UI, and enable it. If you do not see it, see Troubleshooting Linux.

Testing Integration

To check if and what metrics can be collected with given configuration, run bridge plugin in debug mode:

On Windows command line:

Copy
> "C:\Program Files\SolarWinds\Snap\bin\snap-plugin-collector-bridge.exe" --debug-mode --plugin-config "{\"statsd\": {\"protocol\": \"udp\"}}"

On Linux command line:

Copy
$ /opt/SolarWinds/Snap/bin/snap-plugin-collector-bridge --debug-mode --plugin-config "{\"statsd\": {\"protocol\": \"udp\"}}"

Metrics and Tags

Metrics

The StatsD integration does not come with any default metrics, but supports all of the native StatsD metric types for custom metric submission.

Type Description
Counter Simple counter. At each flush the current count is sent and reset to 0
Gauge Constant data type. At each flush the last reported value during the period is sent
Set For counting the number of unique occurrences of events between flushes
Timer Tracking how long an event took, measured in milliseconds

StatsD figures out percentiles, average (mean), standard deviation, sum, lower and upper bounds for the flush interval for timer metrics. In AppOptics, we group these calculations into a single measurement. This allows you to chart multiple data streams with only a single metric name.

To enable percentiles, uncomment percentiles in /opt/SolarWinds/Snap/etc/tasks-autoload.d/tasks-bridge-statsd.yaml.

Copy
## Percentiles to calculate for timing & histogram stats
# percentiles:
#   - 50
#   - 90
#   - 95
#   - 99

To expose these stats as separate metrics, you can set bridge_use_json_fields to false in /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-statsd.yaml.

However, please note that your monthly cost will increase as new metric streams are introduced.

Tags

The table below outlines the default set of tags provided for each metric.

Tag Name Description
hostname Name of the host. Instead of using this tag we recommend using the @host alias.
metric_type Type of the metric (one of counter, gauge, set, timing)

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.