cassandrascylla

Scylla JMX - How is the MBean org.apache.cassandra.metrics:keyspace=uzzstore,name=EstimatedRowCount,scope=chunks,type=ColumnFamily mapped in the API?


Scylla exposes JMX mbeans via its internal API (or the maybe the other way around, but it does not matter). For example I can access the MBean org.apache.cassandra.metrics:name=LiveDiskSpaceUsed,type=ColumnFamily invoking http://localhost:10000/column_family/metrics/live_disk_space_used.

How can I read the MBean

org.apache.cassandra.metrics:keyspace=uzzstore,name=EstimatedRowCount,scope=chunks,type=ColumnFamily

?


Solution

  • It is http://localhost:10000/column_family/metrics/estimated_row_count.

    You can find these metrics by looking at which metrics the scylla-jmx tool uses, or looking at ScyllaDB source code; But you can also conveniently explore the metrics exported by a running ScyllaDB with the UI: http://localhost:10000/ui/. Open this URL in a browser, and it shows you the full list of REST API requests. If you dive into /column_family/ you can see the full list of metrics, a (very short...) description of each, and even the ability to try them out on-the-fly.

    UPDATE:

    This is a per-table metric, so you need to specify the table name at the end of the path. Specify it as keyspace name, colon, and a table name. So try something like http://localhost:10000/column_family/metrics/estimated_row_count/yourkeyspacename:yourtablename.