summaryrefslogtreecommitdiffstats
path: root/docs/gw/elastic.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/gw/elastic.rst')
-rw-r--r--docs/gw/elastic.rst38
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/gw/elastic.rst b/docs/gw/elastic.rst
new file mode 100644
index 00000000..f14103c2
--- /dev/null
+++ b/docs/gw/elastic.rst
@@ -0,0 +1,38 @@
+.. _elastic:
+
+Elasticsearch
+=============
+
+You can export statistics to an ``elasticsearch`` server. The connection
+should be defined in the Glances configuration file as following:
+
+.. code-block:: ini
+
+ [elasticsearch]
+ host=localhost
+ port=9200
+ index=glances
+
+and run Glances with:
+
+.. code-block:: console
+
+ $ glances --export-elasticsearch
+
+The stats are available through the elasticsearch API. For example, to
+get the CPU system stats:
+
+.. code-block:: console
+
+ $ curl http://172.17.0.2:9200/glances/cpu/system
+ {
+ "_index": "glances",
+ "_type": "cpu",
+ "_id": "system",
+ "_version": 28,
+ "found": true,"
+ _source": {
+ "timestamp": "2016-02-04T14:11:02.362232",
+ "value": "2.2"
+ }
+ }