[英]Check if AMQ Artemis broker is healthy using Jolokia through TCP connection
We have an Openshift project ( project1 ) in which we setup an AMQ Artemis broker using the image : amq- amq-broker-7-tech-preview/amq-broker-71-openshif .我们有一个 Openshift 项目 (project1),我们在其中使用图像设置了一个 AMQ Artemis 代理:amq-amq-broker-7-tech-preview/amq-broker-71-openshif。 Being the basic image we don't have any configuration such as SSL or TLS.作为基本映像,我们没有任何配置,例如 SSL 或 TLS。 In order to do the setup we used as example : https://github.com/jboss-container-images/jboss-amq-7-broker-openshift-image/blob/amq71-dev/templates/amq-broker-71-basic.yaml为了进行我们用作示例的设置: https : //github.com/jboss-container-images/jboss-amq-7-broker-openshift-image/blob/amq71-dev/templates/amq-broker-71 -basic.yaml
After the deployment of the image on Openshift we have the following:在 Openshift 上部署映像后,我们有以下内容:
My question is : how we can check if the broker is healthy using the TCP connection to broker-amq-jolokia ?我的问题是:我们如何使用与 broker-amq-jolokia 的 TCP 连接来检查代理是否健康? So far we connected using TCP Sockets in Java to broker-amq-jolokia but we don't know what message in order for Jolokia to respond with the health status of the broker到目前为止,我们使用 Java 中的 TCP 套接字连接到 broker-amq-jolokia,但我们不知道什么消息才能让 Jolokia 以代理的健康状态进行响应
ActiveMQ Artemis has a lot of beans exposed by jolokia and they can be used to perform the required health checks. ActiveMQ Artemis 有很多由 jolokia 公开的 bean,它们可用于执行所需的健康检查。
For a standalone broker could be useful to check:对于独立的经纪人,检查可能很有用:
console/jolokia/read/org.apache.activemq.artemis:broker=\\"$BROKER_NAME\\"/Started
代理启动console/jolokia/read/org.apache.activemq.artemis:broker=\\"$BROKER_NAME\\"/Started
console/jolokia/read/org.apache.activemq.artemis:broker=\\"$BROKER_NAME\\"/DiskStoreUsage
磁盘存储使用console/jolokia/read/org.apache.activemq.artemis:broker=\\"$BROKER_NAME\\"/DiskStoreUsage
console/jolokia/read/org.apache.activemq.artemis:broker=\\"$BROKER_NAME\\"/AddressMemoryUsagePercentage
地址内存使用console/jolokia/read/org.apache.activemq.artemis:broker=\\"$BROKER_NAME\\"/AddressMemoryUsagePercentage
For a cluster of brokers could be useful to check the topology: console/jolokia/exec/org.apache.activemq.artemis:broker=\\"$BROKER_NAME\\"/listNetworkTopology
对于代理集群,检查拓扑可能很有用: console/jolokia/exec/org.apache.activemq.artemis:broker=\\"$BROKER_NAME\\"/listNetworkTopology
All this checks and others can be executed using the tool artemis check
, ie:所有这些检查和其他检查都可以使用工具artemis check
执行,即:
./bin/artemis check queue --name TEST --produce 1000 --browse 1000 --consume 1000 --url tcp://$BROKER_IP:61616
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.