Filtering metrics

Use the dsetool insights_filters command to filter metrics deemed unimportant or sensitive, and focus on specific metrics important to your organization.

Apply filters with one of these options:

--global

Filters metrics reported locally and insights data files.

--insights_only

Filters insights data files only (for diagnostic purposes).

Use a regular expression (regex) to specify which metrics to include or exclude from the filter. The regex is not anchored, so a substring match like Keyspace blocks anything with keyspace in the metric name. You can also specify a full regex such as org.apache.cassandra.metrics.Keyspace.+ to filter metrics from a specific keyspace. For details, see Example filters.

The following tables describe whitelist and blacklist combinations to grant or deny access to a metric using a regex. When evaluating a regex, the blacklist always overrides the whitelist.

Blacklist and whitelist combinations to grant access
Regex Blacklist Whitelist Access

No metric indicated.

-

-

Metric included in whitelist without any blacklist entries.

-

Match

Metric not included in blacklist without any whitelist entries.

No match

-

Metric included in whitelist without any matches in blacklist.

No match

Match

Blacklist and whitelist combinations to deny access
Regex Blacklist Whitelist Access

Metric not included in whitelist without any blacklist entries.

-

No match

X

Metric included in blacklist without any whitelist entries.

Match

-

X

Metric not included in whitelist.

No match

No match

X

Metric included in blacklist without a match in the whitelist.

Match

No match

X

Metric included in both blacklist and whitelist.

Match

Match

X

Example filters

Show all active filters

dsetool insights_filters --show_filters

Remove all active filters

dsetool insights_filters --remove_all_filters

Add a global filter to deny all metrics for a specific keyspace

dsetool insights_filters --add --global --deny "org\\.apache\\.cassandra\\.metrics\\.(keyspace_name|table_name).*(keyspace_name).*"

Add a global filter to deny all metrics matching KeyspaceMetrics

dsetool insights_filters --add --global --deny .+KeyspaceMetrics.+

Remove a global filter to allow metrics for a specific keyspace that has an existing deny filter

dsetool insights_filters --remove --global --deny "org\\.apache\\.cassandra\\.metrics\\.(keyspace_name|table_name).*(keyspace_name).*"

Add a filter to insights data files that deny grace period metrics

dsetool insights_filters --add --insights_only --deny .+gc.+

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com