diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-01-23 11:10:27 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-01-23 11:10:27 +0100 |
commit | 0d35d5477bd1afbbb0bd990592fb69e7bae3743b (patch) | |
tree | 6f84805151a45589ae2c9333c9b90677a81c9b5c /docs/gw/influxdb.rst | |
parent | cdb6bfbb70cd5efb9f5e040e4247111e106367d4 (diff) | |
parent | 1b36ed92a213e56a5801a4d962de7e9164def927 (diff) |
version 3.1.6v3.1.6
Diffstat (limited to 'docs/gw/influxdb.rst')
-rw-r--r-- | docs/gw/influxdb.rst | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/gw/influxdb.rst b/docs/gw/influxdb.rst index 43db9df9..b8717c48 100644 --- a/docs/gw/influxdb.rst +++ b/docs/gw/influxdb.rst @@ -4,6 +4,10 @@ InfluxDB ======== You can export statistics to an ``InfluxDB`` server (time series server). + +InfluxDB (up to version 1.7.x) +------------------------------ + The connection should be defined in the Glances configuration file as following: @@ -16,6 +20,13 @@ following: user=root password=root db=glances + # Prefix will be added for all measurement name + # Ex: prefix=foo + # => foo.cpu + # => foo.mem + # You can also use dynamic values + #prefix=`hostname` + prefix=localhost # Tags will be added for all measurements #tags=foo:bar,spam:eggs # You can also use dynamic values @@ -33,6 +44,45 @@ configuration file (no limit on columns number). Note: if you want to use SSL, please set 'protocol=https'. + +InfluxDB v2 (from InfluxDB v1.8.x/Flux and InfluxDB v2.x) +--------------------------------------------------------- + +Note: The InfluxDB v2 client (https://pypi.org/project/influxdb-client/) +is only available for Python 3.6 or higher. + +The connection should be defined in the Glances configuration file as +following: + +.. code-block:: ini + + [influxdb] + host=localhost + port=8086 + protocol=http + org=nicolargo + bucket=glances + token=EjFUTWe8U-MIseEAkaVIgVnej_TrnbdvEcRkaB1imstW7gapSqy6_6-8XD-yd51V0zUUpDy-kAdVD1purDLuxA== + # Prefix will be added for all measurement name + # Ex: prefix=foo + # => foo.cpu + # => foo.mem + # You can also use dynamic values + #prefix=`hostname` + prefix=localhost + # Tags will be added for all measurements + #tags=foo:bar,spam:eggs + # You can also use dynamic values + #tags=system:`uname -s` + +and run Glances with: + +.. code-block:: console + + $ glances --export influxdb2 + +Note: if you want to use SSL, please set 'protocol=https'. + Grafana ------- |