java 如何打开 Wildfly 8.2 JMX 端口进行监控?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29432354/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 15:17:07  来源:igfitidea点击:

How to open Wildfly 8.2 JMX port for monitoring?

javajbosswildfly-8zabbixcentos7

提问by Aswin Mohanan

I am using Wildfly 8.2 on CentOs. Can anyone help me to open remote JMX on Wildfly 8.2?

我在 CentOs 上使用 Wildfly 8.2。谁能帮我在 Wildfly 8.2 上打开远程 JMX?

I am only using standalone-full.xmland the port 10990 is already accessible for webconsole like: 192.168.1.10:10990/console/

我只是在使用,standalone-full.xml并且 webconsole 已经可以访问端口 10990,例如:192.168.1.10:10990/console/

Now, I am trying to monitor wildfly from jconsole and zabbix with my laptop, but it is not working.

现在,我试图用我的笔记本电脑从 jconsole 和 zabbix 监控wildfly,但它不起作用。

Any help on this is appreciated...

对此的任何帮助表示赞赏......

回答by sibnick

You should use jconsole.shfrom $WILDFLY_HOME/bin/jconsole.shand url

你应该使用jconsole.shfrom$WILDFLY_HOME/bin/jconsole.sh和 url

service:jmx:http-remoting-jmx://192.168.1.10:10990

also allow external connection:

还允许外部连接:

-Djboss.bind.address.management=192.168.1.10

回答by Arnab Biswas

As far as I know, the JMX service on wildly is accessible on port 9990. From your mail, it seems that it's running at 10990 for you.

据我所知,JMX 服务在 9990 端口上可以正常访问。从您的邮件来看,它似乎在 10990 上运行。

To access WildFly over JMX remotelythrough jconsole following are the steps you need to follow:

要通过 jconsole通过 JMX远程访问 WildFly,您需要遵循以下步骤:

  1. On the wildfly server, create management user using add-user.sh.
  2. Get the jboss-cli-client.jar from the wildly server to your local laptop (from where you are planning to launch jconsole).
  3. Invoke the following from your local laptop to start jconsole:
  1. 在 Wildfly 服务器上,使用 add-user.sh 创建管理用户。
  2. 从疯狂的服务器获取 jboss-cli-client.jar 到您的本地笔记本电脑(从您计划启动 jconsole 的位置)。
  3. 从本地笔记本电脑调用以下命令以启动 jconsole:

$JAVA_HOME/bin/jconsole -J-Djava.class.path=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/jconsole.jar:/jboss-client.jar &

$JAVA_HOME/bin/jconsole -J-Djava.class.path=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/jconsole.jar:/jboss-client.jar &

  1. On the jconsole pop up window which comes up on your laptop, select "Remote Process". Provide the following URL:
  1. 在笔记本电脑上出现的 jconsole 弹出窗口中,选择“远程进程”。提供以下网址:

service:jmx:http-remoting-jmx://WildFly_Host:JMX_Port

服务:jmx:http-remoting-jmx://WildFly_Host:JMX_Port

For example, it could be : service:jmx:http-remoting-jmx://1.2.3.4:9990

例如,它可能是:service:jmx:http-remoting-jmx://1.2.3.4:9990

  1. Provide the username and password created in step #1.
  2. Connect.
  1. 提供在步骤 1 中创建的用户名和密码。
  2. 连接。