Metrics are a vital part of complex distributed storage systems, such as Apache Cassandra. It’s important for an operator and a user to have access to metrics at the OS, JVM, and application levels to have full control over the data that is being processed and to prevent emergencies before they occur.

To make metrics accessible, Cassandra heavily relies on the open-source Dropwizard Metrics library, which acts as a skeleton for both metrics representation and storage. Metrics representations are provided as Histogram, Timer, Meter, Gauge, etc. classes for metric types, while storage uses MetricRegistry. The Dropwizard library makes it easy to expose the database internals through various APIs, like JMX or REST, in addition to the sidecar pattern. Apache Casandra has a vibrant ecosystem in this regard, for example, you can write your java-agent to export all data from the registry to the collectd Unix daemon. In conjunction, Cassandra’s virtual tables, which are a relatively recent development by the project’s standards (available since 4.0), have only a fraction of all the metrics so far, so don’t give a full view of internal processes and need to be improved to rectify this.

Leave a Reply

Your email address will not be published. Required fields are marked *