Closed jazzl0ver closed 5 years ago
JMX_PORT is included in the "service.conf". Kafka container entrypoint.sh will source the service.conf file. Kafka should already start with JMX_PORT.
KafkaManager collects the metrics via the JMX_PORT. If JMX_PORT is not set in Kafka, kafkamanager would not be able to collect the metrics. Possibly a bug in kafkamanager?
Kafkamanager reads jmx_port from Zookeeper. Kafka sets this variable in ZK only when JMX_PORT environment variable was exported before starting Kafka.
I see what you mean. Source the service.conf file is not enough. We have to explicitly export JMX_PORT, so kafka starting script will recognize it. We could make a fix to kafka image entrypoint.sh to export JMX_PORT, and rebuild the image. Will make a fix.
It shows -1 instead:
To fix that, the environment variable JMX_PORT has to be set before starting Kafka.
Please, add it to the Kafka task definition.
Probably the line should be: