kubernetes artemis 系列 |promethus + grafana监控 activemq artemis

7 篇文章 0 订阅
7 篇文章 0 订阅

一、Artemis Prometheus Metrics 插件介绍

ActiveMQ Artemis Prometheus Metrics 插件是 ActiveMQ Artemis 消息代理的扩展,它向流行的开源监控系统和时间序列数据库 Prometheus 公开指标。然后,Prometheus 可以按照配置的时间间隔抓取(收集)这些指标,从而可以监控、警报和分析 ActiveMQ Artemis 实例的性能和运行状况。
项目地址:
https://github.com/rh-messaging/artemis-prometheus-metrics-plugin

二、配置Metrics 插件

git clone https://github.com/rh-messaging/artemis-prometheus-metrics-plugin.git
yum install maven 
mvn install 构建

我个人是直接使用官方构建好的包,如果你也使用官网的包就不用下载构建上面的artemis-prometheus-metrics-plugin了;

https://maven.repository.redhat.com/ga/org/apache/activemq/artemis-prometheus-metrics-plugin/1.0.0.CR1-redhat-00010/artemis-prometheus-metrics-plugin-1.0.0.CR1-redhat-00010.jar
https://maven.repository.redhat.com/ga/org/apache/activemq/artemis-prometheus-metrics-plugin-servlet/1.0.0.CR1-redhat-00010/artemis-prometheus-metrics-plugin-servlet-1.0.0.CR1-redhat-00010.war

将jar包和war包下载到本地。
将jar包 cp至lib目录下,war包cp 至web目录下(web目录需自行创建)

$ cp amq-broker-7.9.0/lib/artemis-prometheus-metrics-plugin-1.0.0.CR1-redhat-00010.jar <broker_instance_dir>/lib
mkdir /home/ubuntu/artemis-broker/web
cp artemis-prometheus-metrics-plugin-servlet-1.0.0.CR1-redhat-00010.war  artemis-broker/web/

/etc/broker.xml 配置

<metrics>
    <jvm-gc>true</jvm-gc>
    <jvm-memory>true</jvm-memory
    <jvm-threads>true</jvm-threads>
    <plugin class-name="org.apache.activemq.artemis.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/>
</metrics>

在这里插入图片描述

/etc/bootstrap.xml配置

<app url="metrics" war="metrics.war"/>

在这里插入图片描述
配置后就重启artemis即可
测试 curl 10.103.29.218:8161/metrics/
如果看到artemis指标就成功了

三、promethus配置

在配置文件中加上地址端口即可;例如 10.103.29.218:8161
在这里插入图片描述

四·、grafana面板配置

导入
ActiveMQArtemisSampleDashboard.json 即可

https://github.com/artemiscloud/grafana/blob/master/ActiveMQArtemisSampleDashboard.json

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值