dsetool insights_filters
Configures filters to include and exclude specific metrics for DSE Metrics Collector. Use a regular expression (regex) to specify which metrics to include and exclude.
When DSE Metrics Collector is enabled, the following metrics are always excluded by default:
-
Thread Per Core (TPC) metrics at each core level
-
Keyspace level metrics
-
DataStax Enterprise (DSE) internal table metrics (except
system_auth,paxos, andbatchlogmetrics)
|
Use |
Use a regular expression (regex) to specify which metrics to include or exclude from the filter.
Synopsis
dsetool insights_filters
--show_filters | --remove_all_filters |
--add --global|--insights_only --allow REGEX | --deny REGEX
--remove --global | --insights_only --allow REGEX | --deny REGEX
| Syntax conventions | Description |
|---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a valid option or user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
|
Set, list, map, or tuple.
Angle brackets ( |
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrconfig files. |
Options
- --show_filters
-
Prints the current filters for DSE Metrics Collector.
- --remove_all_filters
-
Remove all metrics filters for DSE Metrics Collector.
- --add
-
Create a filter that includes metrics matching a given
--allowor--denyregular expression, and apply the filter with scope of--globalor--insights_only. For example:-
--add --global --allow REGEX -
--add --insights_only --allow REGEX -
--add --global --deny REGEX -
--add --insights_only --deny REGEX
-
- --remove
-
Remove a filter by specifying the
--allowor--denyclause and the filter scope (--globalor--insights_only). For example:-
--remove --global --allow REGEX -
--remove --insights_only --allow REGEX -
--remove --global --deny REGEX -
--remove --insights_only --deny REGEX
Use
--show_filtersto get the current filters that can be removed. -
- --global or --insights_only
-
Used with
--addand--removeto set the filter scope:-
--global: Set the metrics filter scope to include metrics reported locally and insights data files. -
--insights_only: Set the metrics filter scope to insights data files only. Appropriate for diagnostic use.
-
- --allow or --deny
-
Used with
--addand--removeto specify the metrics to match or not match based on a regular expression:-
--allow: Include metrics that match the given regex. -
--deny: Exclude metrics that match the given regex.
-
Regex syntax
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 Examples.
The following tables describe allowlist and denylist combinations to grant or deny access to a metric using a regex. When evaluating a regex, the denylist always overrides the allowlist.
| Regex | Denylist | Allowlist | Access |
|---|---|---|---|
No metric indicated. |
- |
- |
Granted |
Metric included in allowlist without any denylist entries |
- |
Match |
Granted |
Metric not included in denylist without any allowlist entries |
No match |
- |
Granted |
Metric included in allowlist without any matches in denylist |
No match |
Match |
Granted |
| Regex | Denylist | Allowlist | Access |
|---|---|---|---|
Metric not included in allowlist without any denylist entries |
- |
No match |
Denied |
Metric included in denylist without any allowlist entries |
Match |
- |
Denied |
Metric not included in allowlist |
No match |
No match |
Denied |
Metric included in denylist without a match in the allowlist |
Match |
No match |
Denied |
Metric included in both denylist and allowlist |
Match |
Match |
Denied |
Examples
- Show all active filters
-
dsetool insights_filters --show_filters - Remove all active filters
-
dsetool insights_filters --remove_all_filters - Add a global filter to exclude all metrics for a specific keyspace
-
In this example, the keyspace is named
cyclingand the table is namedranking:dsetool insights_filters --add --global --deny "org\\.apache\\.cassandra\\.metrics\\.(cycling|ranking).*(cycling).*" - Remove a previously set filter
-
Running this command removes the previously set
--global --denyfilter that excluded all metrics for a specific keyspace. After running this command, those metrics will be recorded again unless they are excluded by another filter. In this example, the keyspace is namedcyclingand the table is namedranking.dsetool insights_filters --remove --global --deny "org\\.apache\\.cassandra\\.metrics\\.(cycling|ranking).*(cycling).*" - Add a global filter to deny all metrics matching
KeyspaceMetrics -
dsetool insights_filters --add --global --deny .+KeyspaceMetrics.+ - Add a filter to exclude metrics matching
gcfrom insights data files only -
dsetool insights_filters --add --insights_only --deny .+gc.+