Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/api/server/common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,12 @@ error.
statistic being easily identified, and the content of each statistic is
self-describing.

Statistics are sampled internally on a :ref:`configurable interval
<config/stats>`. When monitoring the ``_stats`` endpoint, you need to use
a polling frequency of at least twice this to observe accurate results.
For example, if the :ref:`interval <config/stats>` is 10 seconds,
poll ``_stats`` at least every 5 seconds.

The literal string ``_local`` serves as an alias for the local node name, so
for all stats URLs, ``{node-name}`` may be replaced with ``_local``, to
interact with the local node's statistics.
Expand Down Expand Up @@ -1504,7 +1510,8 @@ The type of the statistic is included in the ``type`` field, and is one of
the following:

- ``counter``: Monotonically increasing counter, resets on restart
- ``histogram``: Binned set of values with meaningful subdivisions
- ``histogram``: Binned set of values with meaningful subdivisions.
Scoped to the current :ref:`collection interval <config/stats>`.
- ``gauge``: Single numerical value that can go up and down

You can also access individual statistics by quoting the statistics sections
Expand Down
3 changes: 1 addition & 2 deletions src/api/server/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ interact with the local node's configuration.
"max_http_sessions": "10"
},
"stats": {
"rate": "1000",
"samples": "[0, 60, 300, 900]"
"interval": "10"
},
"uuids": {
"algorithm": "utc_random"
Expand Down
14 changes: 3 additions & 11 deletions src/config/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,12 @@ Statistic Calculation

.. config:section:: stats :: Statistic Calculation

.. config:option:: rate
.. config:option:: interval

Rate of statistics gathering in milliseconds::
Interval between gathering statistics in seconds::

[stats]
rate = 1000

.. config:option:: samples

Samples are used to track the mean and standard value deviation within
specified intervals (in seconds)::

[stats]
samples = [0, 60, 300, 900]
interval = 10

.. _config/uuids:

Expand Down