Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some metrics are not filtered #75

Closed
podile opened this issue Mar 10, 2020 · 1 comment · May be fixed by #76
Closed

Some metrics are not filtered #75

podile opened this issue Mar 10, 2020 · 1 comment · May be fixed by #76

Comments

@podile
Copy link

podile commented Mar 10, 2020

The following metrics are not filtered even if mentioned in --exclude list. These metrics generating too many records in case of larger clusters. For example, a cluster of 250 nodes with 150 keyspaces resulting 37500 metrics.

cassandra_keyspace_effective_ownership_ratio
cassandra_token_ownership_ratio
cassandra_jvm_gc_estimated_collection_duration_seconds_total
cassandra_jvm_nio_buffer_pool_estimated_buffers

StorageServiceMBeanMetricFamilyCollector is the source of the first two metrics, is there any reason for not filtering it? If not, I will do code change to filter the metrics and raise a PR.

@zegelin
Copy link

zegelin commented Mar 12, 2020

Try adding an exclusion for org.apache.cassandra.db:type=StorageService. That will disable all StorageService metrics.

Exclusions are implemented at registration time and can either filter on MBean names/patterns or collector names.

For most metrics (anything that uses FunctionalMetricFamilyCollector) the collector name is equivalent to the prometheus metric family name, as there is one-to-one mapping between MBeans, collectors and metric families. Hence you can create an exclusion based on a metric family name, since its actually matching the collector name.

But some MBeans, such as the StorageService, have a custom collector -- in this case StorageServiceMBeanMetricFamilyCollector. These collectors output multiple metric families, hence there is no longer a one-to-one mapping. As a result, the exclusion must be created against the MBean name (in this case org.apache.cassandra.db:type=StorageService). This does have the side effect of filtering all metrics families generated by the collector.

@zegelin zegelin closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants