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.
By default, the following metrics are always excluded:
-
Thread Per Core (TPC) metrics at each core level
-
Keyspace level metrics
-
DataStax Enterprise (DSE) internal table metrics (except
system_auth,paxos, andbatchlogmetrics)
|
Use |
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 |
|---|---|
Italic, bold, or |
Syntax diagrams and code samples use one or more of these styles to mark placeholders for variable values. Replace placeholders with a valid option or your own user-defined value. In CQL statements, it is a requirement to use angle brackets to enclose data types in a set, list, map, or tuple.
Separate the data types with a comma.
For example: In Search CQL statements, use angle brackets to identify the entity and literal value to use when
overwriting the XML element in the schema and |
|
Square brackets surround optional command arguments. Do not type the square brackets. |
|
Parentheses identify a group to choose from. Do not type the parentheses. |
|
A pipe separates alternative elements. Type any one of the elements. Do not type the pipe. |
|
Indicates that you can repeat the syntax element as often as required. |
|
Use single quotation marks to surround literal strings in CQL statements. Use single quotation marks to preserve uppercase. For Search CQL only: Single quotation marks surround an entire XML schema declaration, such as |
|
Map collection.
Curly braces enclose maps ( |
|
Ends a CQL statement. |
|
Separate command line options from command arguments with two hyphens. This syntax is useful when arguments might be mistaken for command line options. |
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.+