File: couchdb.rst

package info (click to toggle)
glances 3.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,944 kB
  • sloc: javascript: 26,103; python: 11,238; makefile: 229; sh: 169
file content (50 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download | duplicates (2)
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
46
47
48
49
50
.. _couchdb:

CouchDB
=======

You can export statistics to a ``CouchDB`` server.
The connection should be defined in the Glances configuration file as
following:

.. code-block:: ini

    [couchdb]
    host=localhost
    port=5984
    user=root
    password=root
    db=glances

and run Glances with:

.. code-block:: console

    $ glances --export couchdb

Documents are stored in native ``JSON`` format. Glances adds ``"type"``
and ``"time"`` entries:

- ``type``: plugin name
- ``time``: timestamp  (format: "2016-09-24T16:39:08.524828Z")

Example of Couch Document for the load stats:

.. code-block:: json

    {
       "_id": "36cbbad81453c53ef08804cb2612d5b6",
       "_rev": "1-382400899bec5615cabb99aa34df49fb",
       "min15": 0.33,
       "time": "2016-09-24T16:39:08.524828Z",
       "min5": 0.4,
       "cpucore": 4,
       "load_warning": 1,
       "min1": 0.5,
       "history_size": 28800,
       "load_critical": 5,
       "type": "load",
       "load_careful": 0.7
    }

You can view the result using the CouchDB utils URL: http://127.0.0.1:5984/_utils/database.html?glances.