-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kafka Configuration to Enable JMX #187
Comments
Make sure JMX_PORT env var is exported before you run the script to start kafka broker: |
in which file inside kafka we have to add export JMX_PORT= property, and while starting kafka-manager it asks for JMX username and password, what should we provide these?? thanks in advance |
To enable JMX Monitoring for Kafka broker, please follow below instructions: Edit kafka-run-class.sh and modify KAFKA_JMX_OPTS variable like below (please replace <> with your Kafka Broker hostname) KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<kafka.broker.hostname >-Djava.net.preferIPv4Stack=true" Add below line in kafka-server-start.sh export JMX_PORT=${JMX_PORT:-9999} |
+1 |
Awesome @tejasmitha that worked for me! Thanks! |
@tejasmitha: yes this is what was missing. However, I would try to avoid modifying OOTB scripts like kafka-run-class.sh if not necessary. Instead, you can rather export the full KAFKA_JMX_OPTS="..." string into environment, like: |
Is it possible to run jmx exporter independently and monitor kafka metrices? |
@chandanatalef you can send all kafka metrics (or any other java based app) via JMX to a metric collection system (e.g. graphite) via jmxtrans-agent (moreover you don't need to enable JMX port on a kafka broker side in this side). |
I'm confused. Apologies if I sound too naive. My kafka broker is running on remote host say, 1.2.3.4:9092 java -jar jmx_prometheus_httpserver-0.3.2-SNAPSHOT-jar-with-dependencies.jar 7071 kafka.yaml kafka.yaml is taken from: https://github.com/prometheus/jmx_exporter/blob/master/example_configs/kafka-2_0_0.yml I am able to see few metrics on localhost:7071
Now, I wonder how can I get jmx to know my kafka metrics - I have no where specified kafka broker address in jmx conf. |
If #187 (comment) doesn't help try appending |
JMX_PORT=8081 bin/kafka-server-start.sh -daemon config/server.properties > /dev/null 2>&1 |
I have 5 broker our on test kafka server . I have added necessary configuration on kafka-run-class.sh and kafka-server-start.sh but ıf ı start again broker and zookeer . just one broker works that is why ı have problem this about . How can ı solve this problem ? |
One of the aspects that Kafka-manager can use is JMX-Polling. What kind of configuration needs to be done in Kafka to enable metrics reporting to Kafka-Manager.
I have a system with multiple agents (kafka producers), which send logs to different topics. I would like to know how many messages are sent by the agents to each topic. I believe kafka-manager fits the bill.
The text was updated successfully, but these errors were encountered: