2018-08-13 13:51:15 +03:00
|
|
|
.. _mqtt:
|
|
|
|
|
|
|
|
MQTT
|
|
|
|
========
|
|
|
|
|
|
|
|
You can export statistics to an ``MQTT`` server. The
|
|
|
|
connection should be defined in the Glances configuration file as
|
|
|
|
following:
|
|
|
|
|
|
|
|
.. code-block:: ini
|
|
|
|
|
|
|
|
[mqtt]
|
|
|
|
host=localhost
|
|
|
|
port=883
|
2021-01-30 10:42:13 +03:00
|
|
|
tls=true
|
2018-08-13 13:51:15 +03:00
|
|
|
user=glances
|
|
|
|
password=glances
|
|
|
|
topic=glances
|
2021-01-25 18:18:05 +03:00
|
|
|
topic_structure=per-metric
|
2018-08-13 13:51:15 +03:00
|
|
|
|
|
|
|
and run Glances with:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ glances --export mqtt
|
2021-01-30 10:42:13 +03:00
|
|
|
|
|
|
|
The topic_structure field aims at configuring the way stats are exported to MQTT (see #1798):
|
2022-10-03 16:53:24 +03:00
|
|
|
- per-metric: one event per metric (default behavior)
|
2021-01-30 10:42:13 +03:00
|
|
|
- per-plugin: one event per plugin
|