Update docs

This commit is contained in:
nicolargo 2021-02-06 12:01:31 +01:00
parent 8af9eb5684
commit 7821292920
3 changed files with 3 additions and 25 deletions

View File

@ -475,7 +475,7 @@ port=8125
[elasticsearch]
# Configuration for the --export elasticsearch option
# Data are available via the ES RESTful API. ex: URL/<index>/cpu/system
# Data are available via the ES RESTful API. ex: URL/<index>/cpu
# https://www.elastic.co
host=localhost
port=9200
@ -500,10 +500,11 @@ queue=glances_queue
# Configuration for the --export mqtt option
host=localhost
port=8883
tls=true
user=guest
password=guest
topic=glances
tls=true
topic_structure=per-metric
[couchdb]
# Configuration for the --export couchdb option

View File

@ -21,22 +21,4 @@ and run Glances with:
$ 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"
}
}
.. _elasticsearch: https://pypi.org/project/elasticsearch/

View File

@ -55,11 +55,6 @@ class Export(GlancesExport):
if not self.export_enable:
return None
# if self.version != elk_version[0]:
# logger.critical(
# "ElasticSearch Python client {} is mandatory, you have version {}".format(self.version, elk_version[0]))
# sys.exit(2)
try:
es = Elasticsearch(hosts=['{}:{}'.format(self.host, self.port)])
except Exception as e: