apache/cassandra · error · IllegalArgumentException
Unknown metric name:
Error message
Unknown metric name:
What it means
RuntimeException from NodeProbe.getSaiMetricValue's switch when the metric name is not one of the recognized SAI metric names (QueryLatency, PostFilteringReadLatency, DiskUsedBytes, etc.). This is a guard over user-supplied metric names for nodetool SAI metric lookups.
Solutions
- Use one of the supported SAI metric names (see nodetool help / StorageAttachedIndexMetrics)
- Check spelling and case of the metric argument
- Extend the switch if a newly added SAI metric must be exposed
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:2078 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/57053ef1b5ced719.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:2078
private Object getSaiMetricValue(String metricName, ObjectName oName) throws IOException
{
switch (metricName)
{
case "QueryLatency":
return JMX.newMBeanProxy(mbeanServerConn, oName, CassandraMetricsRegistry.JmxTimerMBean.class);
case "PostFilteringReadLatency":
case "SSTableIndexesHit":
case "IndexSegmentsHit":
case "RowsFiltered":
return JMX.newMBeanProxy(mbeanServerConn, oName, CassandraMetricsRegistry.JmxHistogramMBean.class);
case "DiskUsedBytes":
case "TotalIndexCount":
case "TotalQueryableIndexCount":
return JMX.newMBeanProxy(mbeanServerConn, oName, CassandraMetricsRegistry.JmxGaugeMBean.class).getValue();
case "TotalQueryTimeouts":
return JMX.newMBeanProxy(mbeanServerConn, oName, CassandraMetricsRegistry.JmxCounterMBean.class).getCount();
default:
throw new IllegalArgumentException("Unknown metric name: " + metricName);
}
}
private String getSaiMetricScope(String metricName)
{
switch (metricName)
{
case "QueryLatency":
case "SSTableIndexesHit":
case "IndexSegmentsHit":
case "RowsFiltered":
return TableQueryMetrics.PerQueryMetrics.PER_QUERY_METRICS_TYPE;
case "PostFilteringReadLatency":
case "TotalQueryTimeouts":
return TableQueryMetrics.TABLE_QUERY_METRIC_TYPE;
case "DiskUsedBytes":
return IndexGroupMetrics.INDEX_GROUP_METRICS_TYPE;
case "TotalIndexCount":View on GitHub (pinned to 88fd0f6a0e)