Type to search.

Statsd module

Serverless

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Serverless interfaces and procedures might differ from classic Elastic Stack deployments.

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

The statsd module is a Metricbeat module which spawns a UDP server and listens for metrics in StatsD compatible format.

The module supports the following types of metrics:

Counter (c)
Measurement which accumulates over period of time until flushed (value set to 0).
Gauge (g)
Measurement which can increase, decrease or be set to a value.
Timer (ms)

Time measurement (in milliseconds) of an event.

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Aggregated until flushed (values reset, except the moving average rates).

Histogram (h)

Time measurement, alias for timer.

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Aggregated until flushed (values reset).

Set (s)
Measurement which counts unique occurrences until flushed (value set to 0).

Example of tag styles supported by the statsd module:

DogStatsD

<metric name>:<value>|<type>|@samplerate|#<k>:<v>,<k>:<v>

InfluxDB

<metric name>,<k>=<v>,<k>=<v>:<value>|<type>|@samplerate

Graphite_1.1.x

<metric name>;<k>=<v>;<k>=<v>:<value>|<type>|@samplerate

The statsd module has these additional config options:

ttl

It defines how long a metric will be reported after it was last recorded. Irrespective of the given ttl, metrics will be reported at least once. A ttl of zero means metrics will never expire.

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. It controls how long a metric is kept, not what it aggregates: counters, sets, timers and histograms report what was recorded since the previous flush. Timers and histograms that received no measurements are not reported for that flush.

statsd.mappings
It defines how metrics will mapped from the original metric label to the event json. Here’s an example configuration:
YAML
statsd.mappings:
  - metric: 'ti_failures'
    value:
      field: task_failures
  - metric: '<job_name>_start'
    labels:
      - attr: job_name
        field: job_name
    value:
      field: started
  1. metric, required: the label key of the metric in statsd, either as a exact match string or as a template with named label placeholder in the format <label_placeholder>
  2. value.field, required: field name where to save the metric value in the event json
  3. label[].attr, required when using named label placeholder: reference to the named label placeholder defined in metric
  4. label[].field, required when using named label placeholder field name where to save the named label placeholder value from the template in the event json

The Statsd module supports the standard configuration options that are described in Modules. Here is an example configuration:

YAML
metricbeat.modules:
- module: statsd
  host: "localhost"
  port: "8125"
  enabled: false
  #ttl: "30s"

The following metricsets are available: