You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/04/08 10:34:30 UTC

[GitHub] [james-project] fiery06 commented on a change in pull request #372: @fiery06 JAMES-3405 Update Prometheus config document

fiery06 commented on a change in pull request #372:
URL: https://github.com/apache/james-project/pull/372#discussion_r609554916



##########
File path: docs/modules/servers/pages/distributed/operate/metrics.adoc
##########
@@ -4,12 +4,22 @@
 James relies on the https://metrics.dropwizard.io/4.1.2/manual/core.html[Dropwizard metric library]
 for keeping track of some core metrics of James.
 
-Such metrics are made available via JMX. You can connect for instance using VisualVM and the associated
-mbean plugins.
+Such metrics are exposed over HTTP and can be made available by using **extensions.routes** in https://github.com/apache/james-project/blob/master/docs/modules/servers/pages/distributed/configure/webadmin.adoc[webadmin.properties] file:
+....
+extensions.routes=org.apache.james.webadmin.dropwizard.MetricsRoutes
+....
+
+Once exposed, you can use https://prometheus.io/[Prometheus] to scrape and visualize them with https://grafana.com/[Grafana].
+Below here is the sample scrape job in **prometheus.yml** file:
+....
+  - job_name: 'Apache James'
+    scrape_interval: 30s
+    metrics_path: /metrics
+    static_configs:
+      - targets: ['james:8000']
+....
 
-You can also export the metrics to ElasticSearch and visualize them with https://grafana.com/[Grafana].
-See xref:distributed/configure/elasticsearch.adoc#_exporting_metrics_directly_to_elasticsearch[elaticseach.properties]
-documentation for more details on how to set this up.
+You can also export the metrics to ElasticSearch and visualize them in https://grafana.com/[Grafana] dashboards.

Review comment:
       Ok I can put the ElasticSearch/Grafana section back

##########
File path: docs/modules/servers/pages/distributed/operate/metrics.adoc
##########
@@ -95,25 +105,35 @@ This is for instance how the JMAP dashboard looks like:
 
 image::metrics.png[metrics for the JMAP protocol request latencies]
 
-== Running and configuring Grafana
+== Running and configuring Prometheus/Grafana
 
-The following command allow you to run a fresh grafana server :
+The following docker-compose.yml file will allow you to run a fresh prometheus/grafana montoring stack:
 
 ....
-docker run -i -p 3000:3000 grafana/grafana
+version: '3'
+
+services:
+  grafana:
+    image: grafana/grafana:latest
+    container_name: grafana
+    ports:
+      - "3000:3000"
+   # volumes:
+    #  - ./conf/grafana/grafana.ini:/etc/grafana/grafana.ini
+    #  - ./conf/grafana/provisioning:/etc/grafana/provisioning
+
+  prometheus:
+    image: prom/prometheus:latest
+    restart: unless-stopped
+    ports:
+      - "9090:9090"
+    volumes: #Map your scrape config to prometheus container.
+      - ./conf/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml

Review comment:
       sure, no problem with that.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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