2016-06-10 17:16:41 +03:00
|
|
|
.. _cassandra:
|
|
|
|
|
2016-09-03 09:48:38 +03:00
|
|
|
Cassandra
|
2016-06-10 17:16:41 +03:00
|
|
|
=========
|
|
|
|
|
2017-03-12 20:52:17 +03:00
|
|
|
You can export statistics to a ``Cassandra`` or ``Scylla`` server.
|
2016-06-10 17:16:41 +03:00
|
|
|
The connection should be defined in the Glances configuration file as
|
|
|
|
following:
|
|
|
|
|
|
|
|
.. code-block:: ini
|
|
|
|
|
|
|
|
[cassandra]
|
|
|
|
host=localhost
|
|
|
|
port=9042
|
|
|
|
protocol_version=3
|
|
|
|
keyspace=glances
|
|
|
|
replication_factor=2
|
|
|
|
table=localhost
|
|
|
|
|
|
|
|
and run Glances with:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2018-04-02 15:07:23 +03:00
|
|
|
$ glances --export cassandra
|
2016-06-10 17:16:41 +03:00
|
|
|
|
|
|
|
The data model is the following:
|
|
|
|
|
|
|
|
.. code-block:: ini
|
|
|
|
|
|
|
|
CREATE TABLE <table> (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time))
|
|
|
|
|
2017-03-12 20:52:17 +03:00
|
|
|
Only numerical stats are stored in the Cassandra table. All the stats
|
|
|
|
are converted to float. If a stat cannot be converted to float, it is
|
|
|
|
not stored in the database.
|