Skip to content

Commit

Permalink
[ISSUE #682] Correct mismatched comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yx9o committed Aug 26, 2024
1 parent e92046d commit 0605ad5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions docs/04-deployment/04Exporter.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RocketMQ Promethus Exporter
# RocketMQ Prometheus Exporter

## 介绍

Expand All @@ -8,7 +8,7 @@
过去版本曾是 87 个 concurrentHashMap,由于 Map 不会删除过期指标,所以一旦有 label 变动就会生成一个新的指标,旧的无用指标无法自动删除,久而久之造成内存溢出。而使用 Cache 结构可可以实现过期删除,且过期时间可配置。
:::

`Rocketmq-expoter` 获取监控指标的流程如下图所示,Expoter 通过 MQAdminExt 向 MQ 集群请求数据,请求到的数据通过 MetricService 规范化成 Prometheus 需要的格式,然后通过 /metics 接口暴露给 Promethus
`Rocketmq-expoter` 获取监控指标的流程如下图所示,Expoter 通过 MQAdminExt 向 MQ 集群请求数据,请求到的数据通过 MetricService 规范化成 Prometheus 需要的格式,然后通过 /metics 接口暴露给 Prometheus
![165754739545](../picture/RocketMQ%20Prometheus%20Exporter-1.jpeg)


Expand Down Expand Up @@ -139,30 +139,30 @@ MetricCollectTask 类中有 5 个定时任务,分别为 collectTopicOffset、c

`application.yml` 中重要的配置主要有:

- server.port 设置 promethus 监听 rocketmq-exporter 的端口, 默认为 5557
- server.port 设置 prometheus 监听 rocketmq-exporter 的端口, 默认为 5557

- rocketmq.config.webTelemetryPath 配置 promethus 获取指标的路径,默认为 /metrics ,使用默认值即可.
- rocketmq.config.webTelemetryPath 配置 prometheus 获取指标的路径,默认为 /metrics ,使用默认值即可.

- rocketmq.config.enableACL 如果 RocketMQ 集群开启了 ACL 验证,需要配置为 true, 并在 accessKey 和 secretKey 中配置相应的 ak, sk.

- rocketmq.config.outOfTimeSeconds 用于配置存储指标和相应的值的过期时间,若超过该时间,cache 中的 key 对应的节点没有发生写更改,则会进行删除.一般配置为 60s 即可(根据 promethus 获取指标的时间间隔进行合理配置,只要保证过期时间大于等于 promethus 收集指标的时间间隔即可)
- rocketmq.config.outOfTimeSeconds 用于配置存储指标和相应的值的过期时间,若超过该时间,cache 中的 key 对应的节点没有发生写更改,则会进行删除.一般配置为 60s 即可(根据 prometheus 获取指标的时间间隔进行合理配置,只要保证过期时间大于等于 prometheus 收集指标的时间间隔即可)

- task._.cron 配置 exporter 从 broker 拉取指标的定时任务的时间间隔,默认值为"15 0/1 _ \* \* ?" 每分钟的 15s 拉取一次指标.

### 启动 exporter 项目

### 按照 promethus 官网配置启动
### 按照 prometheus 官网配置启动

配置 promethus 的 static_config: -targets 为 exporter 的启动 IP 和端口,如: localhost:5557
配置 prometheus 的 static_config: -targets 为 exporter 的启动 IP 和端口,如: localhost:5557

### 访问 promethus 页面
### 访问 prometheus 页面

本地启动默认为: localhost:9090 ,则可对收集到的指标值进行查看,如下图所示:

![3298559603](../picture/RocketMQ%20Prometheus%20Exporter-3.jpeg)

:::tip
为了达到更好的可视化效果,观察指标值变化趋势, promethus 搭配 grafana 效果更佳哦!
为了达到更好的可视化效果,观察指标值变化趋势, prometheus 搭配 grafana 效果更佳哦!
:::


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RocketMQ Promethus Exporter
# RocketMQ Prometheus Exporter

## Introduction

Expand All @@ -7,7 +7,7 @@
In previous versions, there were 87 concurrentHashMaps, but since the Map does not delete expired metrics, once there is a label change, a new metric is generated and the old, unused metric cannot be automatically deleted, which eventually causes a memory overflow. However, using the Cache structure can enable expired deletion, and the expiration time can be configured.
:::

The process for `Rocketmq-exporter` to obtain monitoring metrics is shown in the following figure. The exporter requests data from the MQ cluster through MQAdminExt, and the requested data is standardized into the format required by Prometheus through the MetricService, and then exposed to Promethus through the `/metrics` interface.
The process for `Rocketmq-exporter` to obtain monitoring metrics is shown in the following figure. The exporter requests data from the MQ cluster through MQAdminExt, and the requested data is standardized into the format required by Prometheus through the MetricService, and then exposed to Prometheus through the `/metrics` interface.
![adfljlkvnflkn](../picture/RocketMQ%20Prometheus%20Exporter-1.jpeg)

### Metric structure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RocketMQ Promethus Exporter
# RocketMQ Prometheus Exporter

## Introduction

Expand All @@ -7,7 +7,7 @@
In previous versions, there were 87 concurrentHashMaps, but since the Map does not delete expired metrics, once there is a label change, a new metric is generated and the old, unused metric cannot be automatically deleted, which eventually causes a memory overflow. However, using the Cache structure can enable expired deletion, and the expiration time can be configured.
:::

The process for `Rocketmq-exporter` to obtain monitoring metrics is shown in the following figure. The exporter requests data from the MQ cluster through MQAdminExt, and the requested data is standardized into the format required by Prometheus through the MetricService, and then exposed to Promethus through the `/metrics` interface.
The process for `Rocketmq-exporter` to obtain monitoring metrics is shown in the following figure. The exporter requests data from the MQ cluster through MQAdminExt, and the requested data is standardized into the format required by Prometheus through the MetricService, and then exposed to Prometheus through the `/metrics` interface.
![4586095434](../picture/RocketMQ%20Prometheus%20Exporter-1.jpeg)

### Metric structure
Expand Down
18 changes: 9 additions & 9 deletions versioned_docs/version-5.0/05-deploymentOperations/05Exporter.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RocketMQ Promethus Exporter
# RocketMQ Prometheus Exporter

## 介绍

Expand All @@ -8,7 +8,7 @@
过去版本曾是 87 个 concurrentHashMap,由于 Map 不会删除过期指标,所以一旦有 label 变动就会生成一个新的指标,旧的无用指标无法自动删除,久而久之造成内存溢出。而使用 Cache 结构可可以实现过期删除,且过期时间可配置。
:::

`Rocketmq-expoter` 获取监控指标的流程如下图所示,Expoter 通过 MQAdminExt 向 MQ 集群请求数据,请求到的数据通过 MetricService 规范化成 Prometheus 需要的格式,然后通过 /metics 接口暴露给 Promethus
`Rocketmq-expoter` 获取监控指标的流程如下图所示,Expoter 通过 MQAdminExt 向 MQ 集群请求数据,请求到的数据通过 MetricService 规范化成 Prometheus 需要的格式,然后通过 /metics 接口暴露给 Prometheus
![957681249485](../picture/RocketMQ%20Prometheus%20Exporter-1.jpeg)


Expand Down Expand Up @@ -138,31 +138,31 @@ MetricCollectTask 类中有 5 个定时任务,分别为 collectTopicOffset、c

`application.yml` 中重要的配置主要有:

- server.port 设置 promethus 监听 rocketmq-exporter 的端口, 默认为 5557
- server.port 设置 prometheus 监听 rocketmq-exporter 的端口, 默认为 5557

- rocketmq.config.webTelemetryPath 配置 promethus 获取指标的路径,默认为 /metrics ,使用默认值即可.
- rocketmq.config.webTelemetryPath 配置 prometheus 获取指标的路径,默认为 /metrics ,使用默认值即可.

- rocketmq.config.enableACL 如果 RocketMQ 集群开启了 ACL 验证,需要配置为 true, 并在 accessKey 和 secretKey 中配置相应的 ak, sk.

- rocketmq.config.outOfTimeSeconds 用于配置存储指标和相应的值的过期时间,若超过该时间,cache 中的 key 对应的节点没有发生写更改,则会进行删除.一般配置为 60s 即可(根据 promethus 获取指标的时间间隔进行合理配置,只要保证过期时间大于等于 promethus 收集指标的时间间隔即可)
- rocketmq.config.outOfTimeSeconds 用于配置存储指标和相应的值的过期时间,若超过该时间,cache 中的 key 对应的节点没有发生写更改,则会进行删除.一般配置为 60s 即可(根据 prometheus 获取指标的时间间隔进行合理配置,只要保证过期时间大于等于 prometheus 收集指标的时间间隔即可)

- task._.cron 配置 exporter 从 broker 拉取指标的定时任务的时间间隔,默认值为"15 0/1 _ \* \* ?" 每分钟的 15s 拉取一次指标.

### 启动 exporter 项目

### 按照 promethus 官网配置启动
### 按照 prometheus 官网配置启动

配置 promethus 的 static_config: -targets 为 exporter 的启动 IP 和端口,如: localhost:5557
配置 prometheus 的 static_config: -targets 为 exporter 的启动 IP 和端口,如: localhost:5557

### 访问 promethus 页面
### 访问 prometheus 页面

本地启动默认为: localhost:9090 ,则可对收集到的指标值进行查看,如下图所示:

![906876098423](../picture/RocketMQ%20Prometheus%20Exporter-3.jpeg)


:::tip
为了达到更好的可视化效果,观察指标值变化趋势, promethus 搭配 grafana 效果更佳哦!
为了达到更好的可视化效果,观察指标值变化趋势, prometheus 搭配 grafana 效果更佳哦!
:::


Expand Down

0 comments on commit 0605ad5

Please sign in to comment.