Skip to content

Instantly share code, notes, and snippets.

@cscetbon
Created August 29, 2019 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cscetbon/26f451c9b09480009a33bf59b6462d5f to your computer and use it in GitHub Desktop.
Save cscetbon/26f451c9b09480009a33bf59b6462d5f to your computer and use it in GitHub Desktop.
diff --git a/Dockerfile b/Dockerfile
index 05fbfed..d2e06d9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -51,7 +51,7 @@ ENV \
CASSANDRA_RELEASE=${CASSANDRA_VERSION} \
DI_VERSION=1.2.2 \
JOLOKIA_VERSION=1.6.1 \
- PROMETHEUS_VERSION=0.11.0 \
+ EXPORTER_VERSION=0.9.7 \
PATH=$PATH:/usr/local/apache-cassandra/bin:/usr/local/apache-cassandra/tools/bin/
@@ -67,7 +67,7 @@ RUN set -ex; \
wget \
netcat \
jq; \
- wget -q -O - "http://search.maven.org/remotecontent?filepath=io/prometheus/jmx/jmx_prometheus_javaagent/${PROMETHEUS_VERSION}/jmx_prometheus_javaagent-${PROMETHEUS_VERSION}.jar" > /usr/local/share/prometheus-agent.jar; \
+ wget -q -O /usr/local/share/cassandra-exporter-agent.jar https://github.com/instaclustr/cassandra-exporter/releases/download/v${EXPORTER_VERSION}/cassandra-exporter-agent-${EXPORTER_VERSION}.jar; \
wget -q -O - "http://search.maven.org/remotecontent?filepath=org/jolokia/jolokia-jvm/${JOLOKIA_VERSION}/jolokia-jvm-${JOLOKIA_VERSION}-agent.jar" > /usr/local/share/jolokia-agent.jar; \
mirror_url=$( wget -q -O - 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred' ); \
wget -q -O - "${mirror_url}cassandra/${CASSANDRA_VERSION}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz" > /usr/local/apache-cassandra-bin.tar.gz; \
diff --git a/files/jvm.options b/files/jvm.options
index 55d11d2..c2ce7da 100644
--- a/files/jvm.options
+++ b/files/jvm.options
@@ -240,7 +240,7 @@
#-XX:NumberOfGCLogFiles=10
#-XX:GCLogFileSize=10M
--javaagent:/usr/local/share/prometheus-agent.jar=1234:/etc/cassandra/prometheus.yaml
+-javaagent:/usr/local/share/cassandra-exporter-agent.jar=-l:1234
# Debug
-XX:+PrintCommandLineFlags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment