Skip to content

Commit

Permalink
Cassandra: disable two particularly slow metrics
Browse files Browse the repository at this point in the history
Disabling these two metrics speeds up the scrape time dramatically on our Cassandra cluster - from around 20 seconds to 3 seconds.

I think it's worth disabling these by default because it makes the JMX exporter much more usable with Cassandra and this trick isn't particularly obvious.

Signed-off-by: Russ Garrett <russ@garrett.co.uk>
  • Loading branch information
russss committed Nov 23, 2021
1 parent 459e0df commit ff23ebd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions example_configs/cassandra.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
lowercaseOutputLabelNames: true
lowercaseOutputName: true
whitelistObjectNames: ["org.apache.cassandra.metrics:*"]
# ColumnFamily is an alias for Table metrics
blacklistObjectNames: ["org.apache.cassandra.metrics:type=ColumnFamily,*"]

blacklistObjectNames:
# ColumnFamily is an alias for Table metrics
- "org.apache.cassandra.metrics:type=ColumnFamily,*"
# TotalDiskSpaceUsed and EstimatedPartitionCount slow down scraping significantly
- "org.apache.cassandra.metrics:*,name=TotalDiskSpaceUsed"
- "org.apache.cassandra.metrics:*,name=EstimatedPartitionCount"

rules:
# Generic gauges with 0-2 labels
- pattern: org.apache.cassandra.metrics<type=(\S*)(?:, ((?!scope)\S*)=(\S*))?(?:, scope=(\S*))?, name=(\S*)><>Value
Expand Down

0 comments on commit ff23ebd

Please sign in to comment.