2016-09-24 18:02:33 +03:00
|
|
|
.. _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
|
|
|
|
|
2023-10-07 11:24:05 +03:00
|
|
|
[couchdb]
|
2016-09-24 18:02:33 +03:00
|
|
|
host=localhost
|
2023-10-08 11:10:13 +03:00
|
|
|
port=5984
|
|
|
|
db=glances
|
2023-01-30 12:46:39 +03:00
|
|
|
user=root
|
|
|
|
password=example
|
2016-09-24 18:02:33 +03:00
|
|
|
|
|
|
|
and run Glances with:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2023-10-07 11:24:05 +03:00
|
|
|
$ glances --export couchdb
|
2016-09-24 18:02:33 +03:00
|
|
|
|
2023-10-07 11:24:05 +03:00
|
|
|
Documents are stored in native ``JSON`` format. Glances adds ``"type"``
|
|
|
|
and ``"time"`` entries:
|
2016-09-24 18:02:33 +03:00
|
|
|
|
2023-10-07 11:24:05 +03:00
|
|
|
- ``type``: plugin name
|
2023-10-08 11:10:13 +03:00
|
|
|
- ``time``: timestamp (format: "2016-09-24T16:39:08.524Z")
|
2023-10-07 11:24:05 +03:00
|
|
|
|
|
|
|
Example of Couch Document for the load stats:
|
2016-09-24 18:02:33 +03:00
|
|
|
|
2017-03-12 20:52:17 +03:00
|
|
|
.. code-block:: json
|
2016-09-24 18:02:33 +03:00
|
|
|
|
|
|
|
{
|
2023-10-07 11:24:05 +03:00
|
|
|
"_id": "36cbbad81453c53ef08804cb2612d5b6",
|
|
|
|
"_rev": "1-382400899bec5615cabb99aa34df49fb",
|
|
|
|
"min15": 0.33,
|
2023-10-08 11:10:13 +03:00
|
|
|
"time": "2016-09-24T16:39:08.524Z",
|
2023-10-07 11:24:05 +03:00
|
|
|
"min5": 0.4,
|
|
|
|
"cpucore": 4,
|
|
|
|
"load_warning": 1,
|
|
|
|
"min1": 0.5,
|
|
|
|
"history_size": 28800,
|
|
|
|
"load_critical": 5,
|
|
|
|
"type": "load",
|
|
|
|
"load_careful": 0.7
|
2016-09-24 18:02:33 +03:00
|
|
|
}
|
2023-10-07 11:24:05 +03:00
|
|
|
|
|
|
|
You can view the result using the CouchDB utils URL: http://127.0.0.1:5984/_utils/database.html?glances.
|