From 7821292920f74821c2a6d4ee82e3674c1efb0a32 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 6 Feb 2021 12:01:31 +0100 Subject: Update docs --- conf/glances.conf | 5 +++-- docs/gw/elastic.rst | 18 ------------------ glances/exports/glances_elasticsearch.py | 5 ----- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/conf/glances.conf b/conf/glances.conf index 2df9783d..f21c4fd8 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -475,7 +475,7 @@ port=8125 [elasticsearch] # Configuration for the --export elasticsearch option -# Data are available via the ES RESTful API. ex: URL//cpu/system +# Data are available via the ES RESTful API. ex: URL//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 diff --git a/docs/gw/elastic.rst b/docs/gw/elastic.rst index 2c247fa8..2d2f62a0 100644 --- a/docs/gw/elastic.rst +++ b/docs/gw/elastic.rst @@ -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/ diff --git a/glances/exports/glances_elasticsearch.py b/glances/exports/glances_elasticsearch.py index 0993237d..62cce9fb 100644 --- a/glances/exports/glances_elasticsearch.py +++ b/glances/exports/glances_elasticsearch.py @@ -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: -- cgit v1.2.3