tree: 5d9e5bd6426bd24603e37463925c2da0588d0c51 [path history] [tgz]
  1. image/
  2. james/
  3. src/
  4. docker-compose.yml
  5. pom.xml
  6. README.md
examples/metrics-graphite/README.md

Custom metric integration

James comes with built in integration with the Prometheus ecosystem, and a plugin to export metrics directly to ElasticSearch exist.

However, one might be willing to integrate with arbitrary metric system.

This project demonstrate how to leverage dropwizard metrics built in extensions to connect Apache James with Graphite.

Running the example

For this we build a GraphiteExporter implementing the UserDefinedStartable interface.

Build the project:

mvn clean install

Drop the jar with dependencies in the James extensions-jars folder.

Register it in James configuration, in extensions.properties:

guice.extension.startable=org.apache.james.examples.GraphiteExporter

Then start James.

Metrics can be retrieved in Graphite:

curl -XGET http://192.168.64.2:80/metrics/find?query=* | jq

Running the example with docker compose

Compile:

mvn clean install

Then start James:

docker-compose up