You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/06/12 14:38:51 UTC

[james-project] 02/02: [SITE] Improve metrics documentation

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 19faa6833beb5426a84e79b51c0a85744ab67cfd
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Jun 10 11:26:35 2022 +0700

    [SITE] Improve metrics documentation
    
     - Document Prometheus on legacy website
     - Clarify limitations of the existing ElasticSearch reporter
    
    Only supports ES up to version 6, distinct from James ELasticSearch
    versions.
---
 .../sample-configuration/elasticsearch.properties       | 12 +++++++-----
 .../sample-configuration/elasticsearch.properties       | 11 ++++++-----
 .../sample-configuration/elasticsearch.properties       | 12 +++++++-----
 .../markdown/server/manage-guice-distributed-james.md   |  3 ---
 src/site/xdoc/server/metrics.xml                        | 17 ++++++++++++++++-
 5 files changed, 36 insertions(+), 19 deletions(-)

diff --git a/server/apps/cassandra-app/sample-configuration/elasticsearch.properties b/server/apps/cassandra-app/sample-configuration/elasticsearch.properties
index e21c4bae0d..c6e6daca85 100644
--- a/server/apps/cassandra-app/sample-configuration/elasticsearch.properties
+++ b/server/apps/cassandra-app/sample-configuration/elasticsearch.properties
@@ -77,11 +77,13 @@ elasticsearch.indexAttachments=true
 
 # Reports for metrics into ElasticSearch
 # Defaults to elasticsearch.masterHost : on which server to publish metrics
-elasticsearch.http.host=elasticsearch
-elasticsearch.http.port=9200
-elasticsearch.metrics.reports.enabled=true
-elasticsearch.metrics.reports.period=30
-elasticsearch.metrics.reports.index=james-metrics
+# WARNING: Supported ElasticSearch versions for metrics differs from the James one. Only ElasticSearch version 2 to 6 are supported. This requires a distinct ElasticSearch isntalation for metrics.
+# This component is furthermore unmaintained an use is discouraged.#elasticsearch.http.host=elasticsearch
+# elasticsearch.http.host=elasticsearch
+# elasticsearch.http.port=9200
+# elasticsearch.metrics.reports.enabled=true
+# elasticsearch.metrics.reports.period=30
+# elasticsearch.metrics.reports.index=james-metrics
 
 # Search overrides allow resolution of predefined search queries against alternative sources of data
 # and allow bypassing ElasticSearch. This is useful to handle most resynchronisation queries that
diff --git a/server/apps/distributed-app/sample-configuration/elasticsearch.properties b/server/apps/distributed-app/sample-configuration/elasticsearch.properties
index 99d325756c..ee9221cd3d 100644
--- a/server/apps/distributed-app/sample-configuration/elasticsearch.properties
+++ b/server/apps/distributed-app/sample-configuration/elasticsearch.properties
@@ -76,11 +76,12 @@ elasticsearch.indexAttachments=true
 
 # Reports for metrics into ElasticSearch
 # Defaults to elasticsearch.masterHost : on which server to publish metrics
-elasticsearch.http.host=elasticsearch
-elasticsearch.http.port=9200
-elasticsearch.metrics.reports.enabled=true
-elasticsearch.metrics.reports.period=30
-elasticsearch.metrics.reports.index=james-metrics
+# WARNING: Supported ElasticSearch versions for metrics differs from the James one. Only ElasticSearch version 2 to 6 are supported. This requires a distinct ElasticSearch isntalation for metrics.
+# This component is furthermore unmaintained an use is discouraged.#elasticsearch.http.host=elasticsearch
+#elasticsearch.http.port=9200
+#elasticsearch.metrics.reports.enabled=true
+#elasticsearch.metrics.reports.period=30
+#elasticsearch.metrics.reports.index=james-metrics
 
 # Search overrides allow resolution of predefined search queries against alternative sources of data
 # and allow bypassing ElasticSearch. This is useful to handle most resynchronisation queries that
diff --git a/server/apps/memory-app/sample-configuration/elasticsearch.properties b/server/apps/memory-app/sample-configuration/elasticsearch.properties
index 6ec2428a19..9dd6cabe07 100644
--- a/server/apps/memory-app/sample-configuration/elasticsearch.properties
+++ b/server/apps/memory-app/sample-configuration/elasticsearch.properties
@@ -24,8 +24,10 @@
 
 # Reports for metrics into ElasticSearch
 # Defaults to elasticsearch.masterHost : on which server to publish metrics
-elasticsearch.http.host=elasticsearch
-elasticsearch.http.port=9200
-elasticsearch.metrics.reports.enabled=true
-elasticsearch.metrics.reports.period=30
-elasticsearch.metrics.reports.index=james-metrics
+# WARNING: Supported ElasticSearch versions for metrics differs from the James one. Only ElasticSearch version 2 to 6 are supported. This requires a distinct ElasticSearch isntalation for metrics.
+# This component is furthermore unmaintained an use is discouraged.#elasticsearch.http.host=elasticsearch
+# elasticsearch.http.host=elasticsearch
+# elasticsearch.http.port=9200
+# elasticsearch.metrics.reports.enabled=true
+# elasticsearch.metrics.reports.period=30
+# elasticsearch.metrics.reports.index=james-metrics
diff --git a/src/site/markdown/server/manage-guice-distributed-james.md b/src/site/markdown/server/manage-guice-distributed-james.md
index d5d21cec6f..1a2ffa76c5 100644
--- a/src/site/markdown/server/manage-guice-distributed-james.md
+++ b/src/site/markdown/server/manage-guice-distributed-james.md
@@ -73,9 +73,6 @@ Read this page for [explanations on metrics](metrics.html).
 
 Here is a list of [available metric boards](https://github.com/apache/james-project/tree/master/grafana-reporting)
 
-Configuration of [ElasticSearch metric exporting](config-elasticsearch.html) allows a direct display within 
-[Grafana](https://grafana.com/)
-
 Monitoring these graphs on a regular basis allows diagnosing early some performance issues. 
 
 If some metrics seem abnormally slow despite in depth database performance tuning, feedback is appreciated as well on 
diff --git a/src/site/xdoc/server/metrics.xml b/src/site/xdoc/server/metrics.xml
index 0faeee0006..42f378ea66 100644
--- a/src/site/xdoc/server/metrics.xml
+++ b/src/site/xdoc/server/metrics.xml
@@ -33,9 +33,15 @@
             <p>Such metrics are made available via JMX. You can connect for instance using VisualVM and the associated
             mbean plugins.</p>
 
+            <p>
+                James come with native integration to the prometheus eco-system. Read below.
+            </p>
+
             <p>
                 You can also export the metrics to ElasticSearch and visualize them with <a href="https://grafana.com/">Grafana</a>.
-                See <a href="config-elasticsearch.html">elaticseach.properties</a> documentation for more details on how to set this up.
+                See <a href="config-elasticsearch.html">elaticseach.properties</a> documentation for more details on how to set this up.<br/>
+                <b>WARNING:</b> Supported ElasticSearch versions for metrics differs from the James one. Only ElasticSearch version 2 to 6 are supported. This requires a distinct ElasticSearch isntalation for metrics.
+                This component is furthermore unmaintained an use is discouraged.
             </p>
 
             <p>
@@ -44,6 +50,15 @@
 
         </section>
 
+        <section name="Expose metrics for Prometheus collection">
+            <p>To enable James metrics, add <code>extensions.routes</code> to <a href="https://github.com/apache/james-project/blob/master/docs/modules/servers/pages/distributed/configure/webadmin.adoc">webadmin.properties</a> file:</p>
+            <pre><code>extensions.routes=org.apache.james.webadmin.dropwizard.MetricsRoutes</code></pre>
+
+            <p>Connect to james-admin url to test the result:</p>
+
+            <pre><code>http://james-admin-url/metrics</code></pre>
+        </section>
+
         <section name="Available metrics">
 
             <p>


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org