criteo / cassandra_exporter

Apache Cassandra® metrics exporter for Prometheus
Apache License 2.0
171 stars 94 forks source link

Seeing only `cassandra_stats` in output #30

Closed yellowmegaman closed 6 years ago

yellowmegaman commented 6 years ago

Hi there! Thanks for the exporter, original prometheus jmx exporter is somewhat unstable in our environment.

Before i start heavy digging, i'd like to ask why i can only see cassandra_stats. There are lot's of stuff to collect, and it seems things like clientrequest and columnfamily are not shown.

Am i missing something obvious here?

Config:

---
host: localhost:7199
ssl: False
listenPort: 4067
blacklist:
   # Unaccessible metrics (not enough privilege)
   - java:lang:memorypool:.*usagethreshold.*
   # Leaf attributes not interesting for us but that are presents in many path (reduce cardinality of metrics)
   - .*:999thpercentile
   - .*:95thpercentile
   - .*:fifteenminuterate
   - .*:fiveminuterate
   - .*:durationunit
   - .*:rateunit
   - .*:stddev
   - .*:meanrate
   - .*:mean
   - .*:min
   # Path present in many metrics but uninterresting
   - .*:viewlockacquiretime:.*
   - .*:viewreadtime:.*
   - .*:cas[a-z]+latency:.*
   - .*:colupdatetimedeltahistogram:.*
   # Mostly for RPC, do not scrap them
   - org:apache:cassandra:db:.*
   # columnfamily is an alias for Table metrics in cassandra 3.x
   # https://github.com/apache/cassandra/blob/8b3a60b9a7dbefeecc06bace617279612ec7092d/src/java/org/apache/cassandra/metrics/TableMetrics.java#L162
   - org:apache:cassandra:metrics:columnfamily:.*
   # Should we export metrics for system keyspaces/tables ?
   - org:apache:cassandra:metrics:[^:]+:system[^:]*:.*
   # Don't scrape us
   - com:criteo:nosql:cassandra:exporter:.*
maxScrapFrequencyInSec:
  50:
    - .*
  # Refresh those metrics only every hour as it is costly for cassandra to retrieve them
  3600:
    - .*:snapshotssize:.*
    - .*:estimated.*
    - .*:totaldiskspaceused:.*

JMX is fine

Thanks a lot in advance!

P.S. Sample output | head -n 10:


# TYPE cassandra_stats gauge
cassandra_stats{cluster="clustername",datacenter="datacenter1",keyspace="",table="",name="org:apache:cassandra:metrics:clientrequest:rangeslice:unavailables:count",} 0.0
cassandra_stats{cluster="clustername",datacenter="datacenter1",keyspace="",table="",name="org:apache:cassandra:metrics:indextable:someenv:newmessages:newmessages_deleted_idx:rangelatency:99thpercentile",} 0.0
cassandra_stats{cluster="clustername",datacenter="datacenter1",keyspace="",table="",name="org:apache:cassandra:metrics:indextable:someenv:usersessions:usersessions_deleted_idx:writelatency:count",} 0.0
cassandra_stats{cluster="clustername",datacenter="datacenter1",keyspace="",table="",name="org:apache:cassandra:metrics:indextable:someenv:newchatusers:newchatusers_chat_type_unencr_idx:coordinatorreadlatency:99thpercentile",} 0.0
cassandra_stats{cluster="clustername",datacenter="datacenter1",keyspace="someenv",table="stickers",name="org:apache:cassandra:metrics:table:someenv:stickers:readtotallatency:count",} 0.0
cassandra_stats{cluster="clustername",datacenter="datacenter1",keyspace="someenv",table="drafts",name="org:apache:cassandra:metrics:table:someenv:drafts:readlatency:98thpercentile",} 0.0
cassandra_stats{cluster="clustername",datacenter="datacenter1",keyspace="",table="",name="org:apache:cassandra:metrics:indexcolumnfamily:someenv:newuserchats:newuserchats_chat_type_unencr_idx:tombstonescannedhistogram:50thpercentile",} 0.0
cassandra_stats{cluster="clustername",datacenter="datacenter1",keyspace="channels",table="channels",name="org:apache:cassandra:metrics:table:channels:channels:readlatency:50thpercentile",} 0.0```
yellowmegaman commented 6 years ago

Okay i've found https://github.com/criteo/cassandra_exporter#design-explanation. 😛