jmxtalendgrafanaapache-karafjmx-exporter

Show JvmHeapSize from Talend ESB to Prometheus


I want to get the jvm metrics from Talend ESB and to show the metrics to Grafana.

I can easily see them with JConsole but i do not know how to expose them to Grafana.

My idea was to get the metrics with JMX Exporter and to expose them to prometheus and then to show them on Grafana but when I tried the JMX Exporter,I faced a problem to start it.

C:\Users\admin\Desktop\jmx_exporter-master>java -javaagent:./jmx_prometheus_javaagent-0.12.0.jar=9090:talend-config.yml Error opening zip file or JAR manifest missing : ./jmx_prometheus_javaagent-0.12.0.jar

Some idea or example how to get the JVM heap size from Talend ESB and to expose them to Prometheus?


Solution

  • Clone this project: https://github.com/prometheus/jmx_exporter then navigate to jmx_prometheus_httpserver folder, change the version in pom.xml to 0.12.0 and then execute mvn clean install After that you can find jmx_prometheus_httpserver-0.12.0-jar-with-dependencies.jar in the target folder.

    Create talend-config.yml file and add this lines to it:

    ---
    startDelaySeconds: 0
    #hostPort: 
    username: tadmin
    password: tadmin 
    jmxUrl: service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-trun
    ssl: false
    lowercaseOutputName: false
    lowercaseOutputLabelNames: false
    

    Save it and execute this command:

    java -jar jmx_prometheus_httpserver-0.12.0-jar-with-dependencies.jar localhost:9595 talend-config.yml

    If you want you can change the ip and the port. After executing the command you can access the metrics on this link:

    http://localhost:9595/metrics