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
  • 27,042
  • 3
  • 51
  • 78
Gaurang Shah
  • 10,196
  • 4
  • 63
  • 109

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
  • 27,042
  • 3
  • 51
  • 78
  • 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
  • 343
  • 2
  • 9