instaclustr / cassandra-exporter

Java agent for exporting Cassandra metrics to Prometheus
Apache License 2.0
71 stars 46 forks source link

Add ring neighbour information for each token range present #59

Open serban21 opened 4 years ago

serban21 commented 4 years ago

In some instances it can be useful to have a quick way of getting the list of all neighbours. Even if this is not available as a Cassandra metric, it is possible to get the information using Storage Service describeRingJMX (https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/service/StorageService.java#L1830), which is probably used only for nodetool describering

Also it can be useful as a way to determine ring information before scaling.

serban21 commented 4 years ago

I also added an option whether to resolve IPs to hostnames and add them as a separate label. I'd rather keep it as an option, since DNS resolve might take some time.