summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2016-10-15 19:16:24 +0200
committernicolargo <nicolas@nicolargo.com>2016-10-15 19:16:24 +0200
commit1149608a97721ab226e2797d0277ccd42bbadff6 (patch)
tree74f28cb2cac783b26d43d95947ad48e4dcfcc502 /docs
parent6c502baf7aebd527a4e0ecf3489d4ebe04cd14ce (diff)
Update docs for ZeroMQ export module
Diffstat (limited to 'docs')
-rw-r--r--docs/gw/zeromq.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/gw/zeromq.rst b/docs/gw/zeromq.rst
index 9e4cdbef..5da68080 100644
--- a/docs/gw/zeromq.rst
+++ b/docs/gw/zeromq.rst
@@ -4,6 +4,7 @@ ZeroMQ
======
You can export statistics to a ``ZeroMQ`` server.
+
The connection should be defined in the Glances configuration file as
following:
@@ -14,9 +15,10 @@ following:
port=5678
prefix=G
-Note: Glances envelopes the stats in a publish message with two frames.
+Note: Glances `envelopes`_ the stats before publishing it.
+The message is composed of three frames.
-- first frame containing the following prefix (as STRING)
+- first frame containing the prefix configured in the [zeromq] section (as STRING)
- second frame with the Glances plugin name (as STRING)
- third frame with the Glances plugin stats (as JSON)
@@ -24,7 +26,7 @@ Run Glances with:
.. code-block:: console
- $ glances --export-zeromq
+ $ glances --export-zeromq -C <path>/glances.conf
Following is a simple Python client to subscribe to the Glances stats:
@@ -51,3 +53,5 @@ Following is a simple Python client to subscribe to the Glances stats:
subscriber.close()
context.term()
+
+.. _envelopes: http://zguide.zeromq.org/page:all#Pub-Sub-Message-Envelopes