jmx

OpenShift下的JVM监控

喜欢而已 提交于 2019-11-28 22:38:50
去年写过一篇基于jmx监控的文章,这次在Openshift上实现,发现确实不少变化。主要重点问题在 1. prometheus jmx exporter的改进,不再需要运行一个独立的进程,不需要把数据输入到influxdb, 而是直接提供了prometheus数据。链接在 https://github.com/prometheus/jmx_exporter 2. OpenShift上采用prometheus Operator架构,内置了集群的监控指标,在此基础上如何集成客户化的监控数据。 接下来我们就看看具体的实现过程。 1. 针对应用镜像的修改 下载agent的 jmx_prometheus_javaagent-0.12.0.jar 包,具体链接在 https://github.com/prometheus/jmx_exporter 以tomcat为例,构建一个镜像 [root@master jmx]# ls catalina.sh config.yaml Dockerfile jmx_prometheus_javaagent-0.12.0.jar Dockerfile [root@master jmx]# cat Dockerfile FROM registry.example.com/tomcat:8-slim COPY *.* /usr/local/tomcat/bin/

Accessing a remote MBean server

别来无恙 提交于 2019-11-28 21:37:08
I am running a client/server application using JBoss. How can I connect to the server JVM's MBeanServer? I want to use the MemoryMX MBean to track the memory consumption. I can connect to the JBoss MBeanServer using JNDI lookup but the java.lang.MemoryMX MBean is not registered with the JBoss MBeanServer. EDIT: The requirement is for programmatic access to the memory usage from the client. Unlike the JBoss server's MBeanServer, the JVM's MBean server doesn't allow remote monitoring by default. You need to set various system properties to allow that: http://java.sun.com/javase/6/docs/technotes

Apache ActiveMQ browser can't connect to JMX console

♀尐吖头ヾ 提交于 2019-11-28 21:31:02
I am using Apache ActiveMQ version 5.8.0 and I downloaded Apache ActiveMQ Browser version 2.5.2.8 Within Apache ActiveMQ I edited the activemq.xml configuration to use JMX: <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" brokerName="localhost" dataDirectory="${activemq.data}"> <!-- This needed to be set to true, otherwise JMX won't start in 5.8.0 --> <managementContext> <managementContext createConnector="true"/> </managementContext> </broker> Within the startup script I set the JMX settings as follows: #ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=11099 "

What is the best or most commonly used JMX Console / Client [closed]

北城以北 提交于 2019-11-28 19:32:49
问题 I have a server application that has been instrumented using JMX so that it can be monitored in test and production environments. I wish to show the current value of some JMX exposed attributes as well as the long term trends in a graphical format. What is the best or most commonly used JMX Console / Client I have come across a number of possibilities but none have stood out as clear leader: JConsole (comes with JDK but no graphical view ) JManage (does not look like much recent activity)

Enable JMX on Kafka Brokers

▼魔方 西西 提交于 2019-11-28 19:28:44
I enabled JMX on Kafka brokers by adding `KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<server_IP> -Djava.net.preferIPv4Stack=true`“. However, when I use ‘kafka.tools.JmxTool’ to get the metrics, it outputs Unix time stamps which are not the expected behavior. sh /usr/local/kafka/bin/kafka-run-class.sh kafka.tools.JmxTool -- object-name 'kafka.server:type=BrokerTopicMetrics,name=AllTopicsMessagesInPerSec' --jmx-url service:jmx:rmi:///jndi/rmi://<server_IP>:9111/jmxrmi

Is a good idea to enable jmx (lambda probe) on a production server?

亡梦爱人 提交于 2019-11-28 17:22:06
问题 We are experiencing some slowdowns on our web-app deployed on a Tomcat 5.5.17 running on a Sun VM 1.5.0_06-b05 and our hosting company doesn't gives enough data to find the problem. We are considering installing lambda probe on the production server but it requires to enable JMX (com.sun.management.jmxremote) in order to obtain memory and CPU statistics. Does enabling JMX incur a serious performance penalty? If we enable JMX, are we opening any security flaw? Do I need to setup secure

How to access JMX interface in docker from outside?

南楼画角 提交于 2019-11-28 16:14:15
I am trying to remotely monitor a JVM running in docker. The configuration looks like this: machine 1: runs a JVM (in my case, running kafka) in docker on an ubuntu machine; the IP of this machine is 10.0.1.201; the application running in docker is at 172.17.0.85. machine 2: runs JMX monitoring Note that when I run JMX monitoring from machine 2, it fails with a version of the following error (note: the same error occurs when I run jconsole, jvisualvm, jmxtrans, and node-jmx/npm:jmx): The stack trace upon failing looks something like the following for each of the JMX monitoring tools: java.rmi

How to connect to Java instances running on EC2 using JMX

谁说我不能喝 提交于 2019-11-28 16:06:54
We are having problem connecting to our Java applications running in Amazon's EC2 cluster. We definitely have allowed both the "JMX port" (which is usually the RMI registry port) and the server port (which does most of the work) to the security-group for the instances in question. Jconsole connects but seems to hang and never show any information. We are running our java with something like the following: java -server -jar foo.jar other parameters here > java.log 2>&1 We have tried: Telnets to the ports connect but no information is displayed. We can run jconsole on the instance itself using

jvm添加jmx远程监控

若如初见. 提交于 2019-11-28 15:38:25
调JVM监控的时候需要远程连接机器,所以服务器需要开放JMX协议,配置如下。 现在我的项目是jboot-jfinal项目,用的是undertow容器,在启动脚本里面加入 JAVA_OPTS="-Xms256m -Xmx1024m -Djava.rmi.server.hostname=192.168.0.41 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" 其中 -Xms256m -Xmx1024m 不用关心 是最小jvm和最大jvm内存。 1. -Djava.rmi.server.hostname: 服务器端的ip地址 2. -Dcom.sun.management.jmxremote.port: jmx的开放接口 3. -Dcom.sun.management.jmxremote.authenticate=false 用户账号密码验证关闭 4. -Dcom.sun.management.jmxremote.ssl=false ssl关闭 最后注意 关闭防火墙。 其他 容器配置例如 tomcat

Explain JMX URL

本小妞迷上赌 提交于 2019-11-28 13:54:46
问题 I am trying to understand a JMX service URL. service:jmx:rmi://192.168.30.10:1234/jndi/rmi://192.168.30.10:2344/jmxrmi It would be great, if someone can help me understand this. Thanks 回答1: I will reuse an answer I wrote up earlier for this question: Cannot connect to Tomcat's MBeanServer via jconsole in Java6 It's not complete, but might help: Suppose you have the JMX Server (alias 'JMX Agent' alias 'the JVM you want to connect to') running on 'TARGET MACHINE' with the RMI registry port at