summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2017-03-19 17:59:21 +0100
committernicolargo <nicolas@nicolargo.com>2017-03-19 17:59:21 +0100
commit47485d2e8565de83d4bcf8cae3418396e3bf2463 (patch)
tree4615de64ba763f81cbcd549f2abfa8ad6d8e5e77
parent021d4603268e02576a09efc76ad7f7c125b33ab9 (diff)
Update docs
-rw-r--r--NEWS1
-rw-r--r--docs/_static/prometheus_exporter.pngbin0 -> 25081 bytes
-rw-r--r--docs/_static/prometheus_server.pngbin0 -> 91914 bytes
-rw-r--r--docs/gw/index.rst1
-rw-r--r--docs/gw/prometheus.rst41
-rw-r--r--docs/man/glances.12
6 files changed, 26 insertions, 19 deletions
diff --git a/NEWS b/NEWS
index 39c53c87..f2a19ebc 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Version 2.9.0
Enhancements and new features:
+ * Add a Prometheus export module (issue #930)
* Port in the -c URI (-c hostname:port) (issue #996)
Bugs corrected:
diff --git a/docs/_static/prometheus_exporter.png b/docs/_static/prometheus_exporter.png
new file mode 100644
index 00000000..0e655aae
--- /dev/null
+++ b/docs/_static/prometheus_exporter.png
Binary files differ
diff --git a/docs/_static/prometheus_server.png b/docs/_static/prometheus_server.png
new file mode 100644
index 00000000..32ede88f
--- /dev/null
+++ b/docs/_static/prometheus_server.png
Binary files differ
diff --git a/docs/gw/index.rst b/docs/gw/index.rst
index af454e96..0b9fbb82 100644
--- a/docs/gw/index.rst
+++ b/docs/gw/index.rst
@@ -15,6 +15,7 @@ to providing stats to multiple services (see list below).
elastic
influxdb
opentsdb
+ prometheus
rabbitmq
riemann
statsd
diff --git a/docs/gw/prometheus.rst b/docs/gw/prometheus.rst
index be684e56..bf486ea2 100644
--- a/docs/gw/prometheus.rst
+++ b/docs/gw/prometheus.rst
@@ -1,34 +1,39 @@
-.. _cassandra:
+.. _prometheus:
-Cassandra
-=========
+Prometheus
+==========
-You can export statistics to a ``Cassandra`` or ``Scylla`` server.
-The connection should be defined in the Glances configuration file as
-following:
+You can export statistics to a ``Prometheus`` server through an exporter.
+When the *--export-prometheus* is used, Glances creates a Prometheus exporter
+listening on <host:port> (define in the Glances configuration file).
.. code-block:: ini
- [cassandra]
+ [prometheus]
host=localhost
- port=9042
- protocol_version=3
- keyspace=glances
- replication_factor=2
- table=localhost
+ port=9091
+ prefix=glances
and run Glances with:
.. code-block:: console
- $ glances --export-cassandra
+ $ glances --export-prometheus
-The data model is the following:
+You can check that Glances exports the stats using this URL: http://localhost:9091
+
+.. image:: ../_static/prometheus_exporter.png
+
+In order to store the metrics in a Prometheus server, you should add this
+exporter to your Prometheus server configuration with the following lines
+(in the prometheus.yml configuration file):
.. code-block:: ini
- CREATE TABLE <table> (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time))
+ scrape_configs:
+ - job_name: 'glances_exporter'
+ scrape_interval: 5s
+ static_configs:
+ - targets: ['localhost:9091']
-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.
+.. image:: ../_static/prometheus_server.png
diff --git a/docs/man/glances.1 b/docs/man/glances.1
index 87324ce4..43d8856c 100644
--- a/docs/man/glances.1
+++ b/docs/man/glances.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GLANCES" "1" "Mar 15, 2017" "2.9.0_DEVELOP" "Glances"
+.TH "GLANCES" "1" "Mar 19, 2017" "2.9.0_DEVELOP" "Glances"
.SH NAME
glances \- An eye on your system
.