File: statsd.rst

package info (click to toggle)
gnocchi 4.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,384 kB
  • sloc: python: 21,820; sh: 366; makefile: 54
file content (45 lines) | stat: -rw-r--r-- 2,022 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
===================
Statsd Daemon Usage
===================

What Is It?
===========
`Statsd`_ is a network daemon that listens for statistics sent over the network
using TCP or UDP, and then sends |aggregates| to another backend.

Gnocchi provides a daemon that is compatible with the statsd protocol and can
listen to |metrics| sent over the network, named `gnocchi-statsd`.

.. _`Statsd`: https://github.com/etsy/statsd/

How Does It Work?
=================
In order to enable statsd support in Gnocchi, you need to configure the
`[statsd]` option group in the configuration file. You need to provide a
|resource| ID that will be used as the main generic |resource| where all the
|metrics| will be attached, a user and project id that will be associated with
the |resource| and |metrics|, and an |archive policy| name that will be used to
create the |metrics|.

All the |metrics| will be created dynamically as the |metrics| are sent to
`gnocchi-statsd`, and attached with the provided name to the |resource| ID you
configured.

The `gnocchi-statsd` may be scaled, but trade-offs have been made due to the
nature of the statsd protocol. That means that if you use |metrics| of type
`counter`_ or sampling (`c` in the protocol), you should always send those
|metrics| to the same daemon – or not use them at all. The other supported
types (`timing`_ and `gauges`_) do not suffer this limitation, but be aware
that you might have more |measures| than expected if you send the same |metric|
to different `gnocchi-statsd` servers, as neither their cache nor their flush
delay are synchronized.

.. _`counter`: https://github.com/etsy/statsd/blob/master/docs/metric_types.md#counting
.. _`timing`: https://github.com/etsy/statsd/blob/master/docs/metric_types.md#timing
.. _`gauges`: https://github.com/etsy/statsd/blob/master/docs/metric_types.md#gauges

.. note ::
   The statsd protocol support is incomplete: relative gauge values with +/-
   and sets are not supported yet.

.. include:: include/term-substitution.rst