2016-03-02 15:29:19 +03:00
|
|
|
.. _influxdb:
|
|
|
|
|
|
|
|
InfluxDB
|
|
|
|
========
|
|
|
|
|
|
|
|
You can export statistics to an ``InfluxDB`` server (time series server).
|
|
|
|
The connection should be defined in the Glances configuration file as
|
|
|
|
following:
|
|
|
|
|
|
|
|
.. code-block:: ini
|
|
|
|
|
|
|
|
[influxdb]
|
|
|
|
host=localhost
|
|
|
|
port=8086
|
2019-07-03 23:13:16 +03:00
|
|
|
protocol=http
|
2016-03-02 15:29:19 +03:00
|
|
|
user=root
|
|
|
|
password=root
|
|
|
|
db=glances
|
2016-07-05 15:42:10 +03:00
|
|
|
tags=foo:bar,spam:eggs
|
2016-03-02 15:29:19 +03:00
|
|
|
|
|
|
|
and run Glances with:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2018-04-02 15:07:23 +03:00
|
|
|
$ glances --export influxdb
|
2016-03-02 15:29:19 +03:00
|
|
|
|
2017-03-12 20:52:17 +03:00
|
|
|
Glances generates a lot of columns, e.g., if you have many running
|
|
|
|
Docker containers, so you should use the ``tsm1`` engine in the InfluxDB
|
|
|
|
configuration file (no limit on columns number).
|
2016-03-02 15:29:19 +03:00
|
|
|
|
2019-07-03 23:13:16 +03:00
|
|
|
Note: if you want to use SSL, please set 'protocol=https'.
|
|
|
|
|
2016-03-02 15:29:19 +03:00
|
|
|
Grafana
|
|
|
|
-------
|
|
|
|
|
2017-06-04 18:02:45 +03:00
|
|
|
For Grafana users, Glances provides a dedicated `dashboard`_.
|
|
|
|
|
|
|
|
.. image:: ../_static/glances-influxdb.png
|
|
|
|
|
|
|
|
To use it, just import the file in your ``Grafana`` web interface.
|
2016-03-02 15:29:19 +03:00
|
|
|
|
|
|
|
.. image:: ../_static/grafana.png
|
|
|
|
|
|
|
|
.. _dashboard: https://github.com/nicolargo/glances/blob/master/conf/glances-grafana.json
|