无法使用来自Kafka的jolokia提取JMX数据 [英] Unable to pull JMX data using jolokia from Kafka

查看:546
本文介绍了无法使用来自Kafka的jolokia提取JMX数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在centos 7计算机上安装了Jolokia,并尝试使用Jolokia代理提取Kafka指标,并使用Nagios插件check_jmx4perl与Icinga监视工具集成.以下是我遵循的配置步骤

I have installed Jolokia in centos 7 machine and trying to pull Kafka metrics using Jolokia agent and integrate with Icinga monitoring tool using Nagios plugin check_jmx4perl. Below are the configuration steps I have followed

第1步:下载了jolokia-jvm-1.3.4-agent.jar

Step 1: Downloaded jolokia-jvm-1.3.4-agent.jar

第2步:复制到/home/usr/

Step 2: Copied to /home/usr/

第3步:通过发出命令chmod a+x /home/usr/jolokia-jvm-1.3.4.jar

Step 3: Provided permissions by issuing command chmod a+x /home/usr/jolokia-jvm-1.3.4.jar

第4步:通过发出命令export KAFKA_OPTS="$KAFKA_OPTS -javaagent:/home/usr/jolokia-jvm-1.3.4-agent.jar=host=*"

Step 4: Added to class path by issuing command export KAFKA_OPTS="$KAFKA_OPTS -javaagent:/home/usr/jolokia-jvm-1.3.4-agent.jar=host=*"

第5步:以独立模式启动Zookeeper和Kafka,并尝试通过显示消息来获取正常工作的主题列表

Step 5: Started Zookeeper and Kafka in standalone mode and tried to fetch list of topics which works fine by displaying the message

INFO: No access restrictor found, access to all MBean is allowed
Jolokia: Agent started with URL http://0:0:0:0:0:0:0:0:8778/jolokia/

第6步:通过发出命令j4psh http://localhost:8778

Step 6: Testing jolokia agent by issuing the command j4psh http://localhost:8778

Connection refused

我也尝试提供IP地址,但是问题仍然存在.我需要在etc/hosts文件中输入主机吗?

I have also tried by providing IP address but the issue still remains the same. Do I need to make an entry of the host in etc/hosts file?

推荐答案

添加到KAFKA_OPTS:

Add to KAFKA_OPTS:

javaagent:/usr/share/java/kafka/jolokia-jvm-1.6.0-agent.jar -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=9999  -Djava.security.auth.login.config=/var/private/sasl_acl/kafka.server.jaas.config

这篇关于无法使用来自Kafka的jolokia提取JMX数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆