Nevermind,
after hours of investigation, I found the solution myself just after
having the mail sent to the list ...
Even though some resources on the web highlight the importance to wrap
what follows "-javaagent:" between "", this seems to be the issue; note
that the log complains about it could not find:
"/etc/cassandra/prometheus/jmx_prometheus_javaagent-0.12.0.jar
Note the leading double-quote here ...
Removing the quotes makes it work like a charm.
Sorry for bothering!
BR,
Marc
On 25.07.19 18:02, Marc Richter wrote:
Hi everyone,
I have an existing Cassandra node (3.7). Now, I'd like to be able to
grab metrics from it for my Prometheus + Grafana based monitoring.
I downloaded "jmx_prometheus_javaagent-0.12.0.jar" from [1], copied it
to "/etc/cassandra/prometheus/jmx_prometheus_javaagent-0.12.0.jar".
I also downloaded "cassandra.yml" from [2] and saved it to
"/etc/cassandra/prometheus/jmx_prometheus_javaagent_cassandra.yml".
Next, I appended the following to my cassandra-env.sh:
```
PROMETHEUS_AGENT='-javaagent:"/etc/cassandra/prometheus/jmx_prometheus_javaagent-0.12.0.jar=7070:/etc/cassandra/prometheus/jmx_prometheus_javaagent_cassandra.yml"'
JVM_OPTS="$JVM_OPTS $PROMETHEUS_AGENT"
```
When I now try to start my Cassandra node, it fails and writes this to
my logfile:
```
Error opening zip file or JAR manifest missing :
"/etc/cassandra/prometheus/jmx_prometheus_javaagent-0.12.0.jar
Error occurred during initialization of VM
agent library failed to init: instrument
```
I'm using the official Cassandra Docker image [3], tag 3.7.
I found the steps I did here in many online resources. I could not find
any issue which matches what I'm facing.
Does anybody have an idea?
BR,
Marc
[1]
https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.12.0/jmx_prometheus_javaagent-0.12.0.jar
[2]
https://raw.githubusercontent.com/prometheus/jmx_exporter/master/example_configs/cassandra.yml
[3] https://hub.docker.com/_/cassandra
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org