jmx_exporter
jmx_exporter copied to clipboard
No main manifest attribute, in jmx_prometheus_javaagent-0.16.1.jar
When following the README command,
java -javaagent:./jmx_prometheus_javaagent-0.16.1.jar=8080:config.yaml -jar jmx_prometheus_javaagent-0.16.1.jar
I get the following error: no main manifest attribute, in jmx_prometheus_javaagent-0.16.1.jar
In The MANIFEST.MF and pom.xml file, I do not see a Main-Class but only an Agent-Class and a Premain-Class. Is this intended? What is the correct way to run this?
The last argument should be the JAR file of your application that you want to monitor, like
java -javaagent:./jmx_prometheus_javaagent-0.16.1.jar=8080:config.yaml -jar yourJar.jar
The last argument should be the JAR file of your application that you want to monitor, like
java -javaagent:./jmx_prometheus_javaagent-0.16.1.jar=8080:config.yaml -jar yourJar.jar
Even if we provide the jar we want to monitor, it gives same error
Could you try to run the same command without the -javaagent:./jmx_prometheus_javaagent-0.16.1.jar=8080:config.yaml parameter? I assume that the Main-Class attribute is missing in your application JAR, and that's causing the error.
I tried that and it didn't work. Have another suggestion?
Please provide the full/exact command line you are using.
Closing as stale. Please reopen if you would like to continue the discussion.
Hi, I am also getting the error after running : java -javaagent:./jmx_prometheus_javaagent-0.19.0.jar=12345:kafka-0-8-2.yml -jar jmx_prometheus_javaagent-0.19.0.jar
no main manifest attribute, in jmx_prometheus_javaagent-0.19.0.jar
please help to fix the same or any other command which will work
@BIPINAIREE this is working as expected. The JMX Exporter Java agent jar is a Java agent that you configure to run with your application.
Example:
java -javaagent:./jmx_prometheus_javaagent-0.16.1.jar=8080:config.yaml -jar yourJar.jar