3

I am using confluent HDFS sink connector and would like to know how to get consumer properties to expose through either JMX or REST API.

I checked the following two properties, however, I don't know how to expose metrics to jmx port

  1. connect-standalone.properties
  2. consumer.properties
Robin Moffatt
  • 30,382
  • 3
  • 65
  • 92
Gaurang Shah
  • 11,764
  • 9
  • 74
  • 137

2 Answers2

3

Set JMX_PORT when you launch Kafka Connect. e.g.

export JMX_PORT=4242
./bin/connect-distributed ./etc/kafka/connect-distributed.properties

You can then connect to JMX using JConsole, JMXTerm, etc.

Robin Moffatt
  • 30,382
  • 3
  • 65
  • 92
  • I modified the file `./bin/connect-distributed` and mentioned the port inside it `JMX_PORT=4242` and then restarted the service. However it's not working – Gaurang Shah Mar 11 '19 at 15:06
0

Had the same issue a few days back - this stackoverflow link has one way how the issue was resolved. It was able to expose the metrics using jmx exporter, which got scraped by Prometheus.

floating_hammer
  • 409
  • 3
  • 10