jmx_exporter icon indicating copy to clipboard operation
jmx_exporter copied to clipboard

Secure configuration fails for JMX exporter

Open manjukashyap opened this issue 3 years ago • 1 comments
trafficstars

WHAT:

Normal configuration without authentication works fine. However if provided the below parameters to enable authentication it fails to startup tomcat.

VERSION:

Exporter: jmx_prometheus_javaagent-0.16.1 TOMCAT: 8.5.9 config.yaml:


startDelaySeconds: 0 hostPort: 127.0.0.1:10001 username: admin password: ###### ssl: false lowercaseOutputLabelNames: true lowercaseOutputName: true

Tries with hostPort: IP:10001 as well, yet failing. Please assist.

manjukashyap avatar Nov 29 '21 17:11 manjukashyap

There are two ways to use jmx_exporter:

  1. The javaagent attaches directly to a JVM (for example to a JVM running tomcat in your case), and it will get the JMX metrics from that JVM.
  2. The standalone httpserver connects to a remote JMX server and gets JMX metrics from there. That's what the username and password configuration is for.

It looks like you are trying to use the javaagent but configuring it to connect to a remote JMX server.

fstab avatar Nov 29 '21 19:11 fstab

This has been tested and works as expected. A comprehensive integration test suite is part of the next release that tests this functionality.

dhoard avatar Jun 24 '23 03:06 dhoard