Metrics Collector for Apache Cassandra (MCAC) filters to limit load times
The Java jvm for Apache Cassandra and DSE expose hundreds of thousands of different metrics. Trying to pull and store so many metrics is time-consuming and will cause loading issues when trying to view. Thus, we need to set up some filters to limit the amount of data collected.
We can do that with filters. The following filters drop us down to about 3000 metrics, and should load within 1s in a typical prometheus — grafana metrics set up.
metric-collector.yamlfiltering_rules:
- policy: deny
pattern: system_auth
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.(keyspace|table).*(system_(?!auth)|system\.(?!(paxos|batches))|ds_|solr_admin|system$).*
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.client_request\..*\.cas_(read|write)
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.keyspace.*
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.table\.cas.*
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.table\.percent_repaired.*
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.table\.row_cache.*
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.table\.view.*
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.table\.bytes_anticompacted.*
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.table\.bytes_mutated_anticompaction.*
scope: global
- policy: deny
pattern: org\.apache\.cassandra\.metrics\.table\.memtable_switch_count.*
scope: global
That’s a good start. Many of the keyspace metrics are duplicated at the table level, so there’s no need to maintain both.