You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wi...@apache.org on 2020/01/06 11:44:45 UTC

[couchdb-documentation] branch stats created (now 06fbe27)

This is an automated email from the ASF dual-hosted git repository.

willholley pushed a change to branch stats
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


      at 06fbe27  Update _stats configuration

This branch includes the following new commits:

     new 06fbe27  Update _stats configuration

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb-documentation] 01/01: Update _stats configuration

Posted by wi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

willholley pushed a commit to branch stats
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git

commit 06fbe271ebdd2fe88f3dbb1bb0411fc1e5cdc8d3
Author: Will Holley <wi...@gmail.com>
AuthorDate: Mon Jan 6 11:41:53 2020 +0000

    Update _stats configuration
    
    Documents the `stats.interval` configuration key and remove
    the redundant `rate` and `samples` keys.
    
    Additionally, adds a note about how `histogram` types interact
    with the collection interval and how `_stats` should be safely
    consumed to avoid lossy sampling.
---
 src/api/server/common.rst        |  9 ++++++++-
 src/api/server/configuration.rst |  3 +--
 src/config/misc.rst              | 14 +++-----------
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/api/server/common.rst b/src/api/server/common.rst
index 9512c75..df84330 100644
--- a/src/api/server/common.rst
+++ b/src/api/server/common.rst
@@ -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.
@@ -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
diff --git a/src/api/server/configuration.rst b/src/api/server/configuration.rst
index 77e7d03..6a59ba1 100644
--- a/src/api/server/configuration.rst
+++ b/src/api/server/configuration.rst
@@ -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"
diff --git a/src/config/misc.rst b/src/config/misc.rst
index 6b9f134..78e733c 100644
--- a/src/config/misc.rst
+++ b/src/config/misc.rst
@@ -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: