Presentation

James relies on the 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.

You can also export the metrics to ElasticSearch and visualize them with Grafana. See elaticseach.properties documentation for more details on how to set this up.

Available metrics

Here are the available metrics :

  • James JVM metrics
  • Number of active SMTP connections
  • Number of SMTP commands received
  • Number of active IMAP connections
  • Number of IMAP commands received
  • Number of active LMTP connections
  • Number of LMTP commands received
  • Number of per queue number of enqueued mails
  • Number of sent emails
  • Number of delivered emails
  • Diverse Response time percentiles, counts and rates for JMAP
  • Diverse Response time percentiles, counts and rates for IMAP
  • Diverse Response time percentiles, counts and rates for SMTP
  • Diverse Response time percentiles, counts and rates for WebAdmin
  • Diverse Response time percentiles, counts and rates for each JMS message queue
  • Per mailet and per matcher Response time percentiles
  • Diverse Response time percentiles, counts and rates for DNS
  • Cassandra Java driver metrics
  • Tika HTTP client statistics
  • SpamAssassin TCP client statistics
  • Mailbox listeners statistics time percentiles
  • Mailbox listeners statistics requests rate
  • Pre-deletion hooks execution statistics time percentiles
Retrieve available boards for Grafana.

In addition to these metrics, you can define your own metrics using the Metrics mailet. By adding it in your mailet container, you can count emails that pass via any points. You can also, using matchers, count emails that matches the conditions you defined.

Limitations

Those metrics are only available with Guice.