Getting a metric

To get a metric, such as DownEnpointCount in the org.apache.Cassandra.net package, the get command can be used as follows. This gives a count of nodes that are down via the CLI, which in turn can be used for alerting through a cron job.

Which is your most-used metric in Cassandra?

get -b org.apache.cassandra.net:type=FailureDetector DownEndpointCount

The output of the preceding command is as follows:

Figure 7.7: Getting the DownEndpointCount metric on JMXTerm

Get Mastering Apache Cassandra 3.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.