Skip to content

Latest commit

 

History

History
88 lines (55 loc) · 3.06 KB

File metadata and controls

88 lines (55 loc) · 3.06 KB

docs

g3statsd

g3statsd is statsd-compatible stats aggregator.

It is developed to meet the needs in G3 project as all applications use StatsD as metrics sending protocol.

The features make it different from other statsd server implementations are:

  • written in async rust, which make it efficient and safe
  • compatible with DogStatsD protocol, tags supported
  • each exporter has its own emit interval
  • can aggregate gauge metric values when dropping tags

There are still many features missing as the current focus is our internal usage, feel free to submit feature request issues. PRs are also welcomed.

Building

You need to follow the dev-setup guide to set up your build environment first.

To build debug binaries:

cargo build -p g3statsd -p g3statsd-ctl

To build release binaries:

cargo build --profile release-lto -p g3statsd -p g3statsd-ctl

See Build and Package if you want to build binary packages or docker images.

Supported Metric Types

  • c - COUNT
  • g - GAUGE
  • h - HISTOGRAM (unsupported yet)
  • ms - TIMER (unsupported yet)

Supported Importers

  • statsd

    Accept StatsD metrics, and send them to collectors.

    Only UDP is supported at this time.

Supported Collectors

  • aggregate

    Aggregate received metrics and send them to exporters.

    You can set join_tags in this collector to join metrics when drop tags.

  • regulate

    Make some changes to the received metrics and send directly to exporters.

    The supported actions are:

    • prefix - add a common name prefix to all metrics
    • drop_tags - drop tags for all metrics

Supported Exporters

Exporter Introduction Aggregate Global prefix and tags
console Log all metrics to stdout no no
discard Discard all metrics no no
memory Store all metrics values in memory no no
graphite Emit to graphite by using the plaintext protocol yes yes
opentsdb Emit to OpenTSDB by using the /api/put API yes yes
influxdb_v2 Emit to InfluxDB v2 by using the /api/v2/write API yes yes
influxdb_v3 Emit to InfluxDB v3 by using the /api/v3/write_lp API yes yes

Documents

You can view the reference documentation generated by sphinx online at Read the Docs.

Examples

You can find example config in the examples directory.