diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-02-06 12:01:31 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-02-06 12:01:31 +0100 |
commit | 7821292920f74821c2a6d4ee82e3674c1efb0a32 (patch) | |
tree | 91b9a3d099a5785bddb0c4ee123cc4c22c235289 | |
parent | 8af9eb5684dcee0cf0ae1e5b9cc584ad7ed45707 (diff) |
Update docsissue1714
-rw-r--r-- | conf/glances.conf | 5 | ||||
-rw-r--r-- | docs/gw/elastic.rst | 18 | ||||
-rw-r--r-- | 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/<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 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: |