rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vongosl...@apache.org
Subject [rocketmq-exporter] 23/33: add set up example for rocketmq exporter
Date Mon, 22 Jul 2019 09:51:21 GMT
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-exporter.git

commit 8f4449b75ad0b925b7bdd40486ce0616889d894b
Author: fengqing <fengqing@sunlands.com>
AuthorDate: Mon Jul 22 14:24:16 2019 +0800

    add set up example for rocketmq exporter
---
 rocketmq_exporter_setup_example.md    | 101 ----------------------------------
 rocketmq_exporter_setup_example_es.md |  57 +++++++++++++++++++
 2 files changed, 57 insertions(+), 101 deletions(-)

diff --git a/rocketmq_exporter_setup_example.md b/rocketmq_exporter_setup_example.md
deleted file mode 100644
index a550185..0000000
--- a/rocketmq_exporter_setup_example.md
+++ /dev/null
@@ -1,101 +0,0 @@
-##                            RocketMQ-Exporter使用示例
-
-1 启动NameServer和Broker
-
-要验证RocketMQ的Spring-Boot客户端,首先要确保RocketMQ服务正确的下载并启动。可以参考RocketMQ主站的快速开始来进行操作。确保启动NameServer和Broker已经正确启动。
-
-2 编译RocketMQ-Exporter
-用户当前使用,需要自行下载git源码编译
-
-```
-git clone https://github.com/apache/rocketmq-exporter
-cd rocketmq-exporter
-mvn clean install
-```
-3 配置和运行
-RocketMQ-Exporter 有如下的运行选项
-选项 | 默认值 | 含义
----|---|---
-rocketmq.config.namesrvAddr | 127.0.0.1:9876 | MQ集群的nameSrv地址
-rocketmq.config.webTelemetryPath | /metrics | 指标搜集路径
-server.port | 5557 | HTTP服务暴露端口
-以上的运行选项既可以在下载代码后在配置文件中更改,也可以通过命令行来设置。
-编译出来的jar包就叫rocketmq-exporter-0.0.1-SNAPSHOT.jar,可以通过如下的方式来运行。
-
-```
-java -jar rocketmq-exporter-0.0.1-SNAPSHOT.jar [--rocketmq.config.namesrvAddr="127.0.0.1:9876"
...]
-```
-
-4 安装Prometheus
-首先到Prometheus官方下载地址:[https://prometheus.io/download/](https://prometheus.io/download/)去下载Prometheus安装包,当前以linux的安装为例,选择的安装包为
-prometheus-2.7.0-rc.1.linux-amd64.tar.gz,经过如下的操作步骤就可以启动prometheus进程。
-
-```
-tar -xzf prometheus-2.7.0-rc.1.linux-amd64.tar.gz
-cd prometheus-2.7.0-rc.1.linux-amd64/
-./prometheus --config.file=prometheus.yml --web.listen-address=:5555
-```
-prometheus 默认监听端口号为9090,为了不与系统上的其它进程监听端口冲突,我们在启动参数里面重新设置了监听端口号为5555。然后通过浏览器访问http://<服务器IP地址>:5555,就可以验证prometheus是否已成功安装。由于RocketMQ-Exporter进程已启动,这个时候可以通过prometheus来抓取RocketMQ-Exporter的数据,这个时候只需要更改prometheus启动的配置文件即可。
-整体配置文件如下:
-
-```
-# my global config
-global:
-   scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every
1 minute.
-   evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
-   # scrape_timeout is set to the global default (10s).
- 
- 
- # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
- rule_files:
-   # - "first_rules.yml"
-   # - "second_rules.yml"
-   
-
- scrape_configs:
-   - job_name: 'prometheus'
-     static_configs:
-     - targets: ['localhost:5555']
-   
-   
-   - job_name: 'exporter'
-     static_configs:
-     - targets: ['localhost:5557']
-```
-更改配置文件后,重启即可。
-
-5 Grafana dashboard for RocketMQ
-
-Prometheus自身的指标展示平台没有当前流行的展示平台Grafana好, 为了更好的展示RocketMQ的指标,可以使用Grafana来展示Prometheus获取的指标。首先到官网去下载[https://grafana.com/grafana/download](https://grafana.com/grafana/download),
这里仍以二进制文件安装为例进行介绍。
-
-```
-wget https://dl.grafana.com/oss/release/grafana-6.2.5.linux-amd64.tar.gz 
-tar -zxvf grafana-6.2.5.linux-amd64.tar.gz
-cd grafana-5.4.3/
-```
-同样为了不与其它进程的端口冲突,可以修改conf目录下的defaults.ini文件的监听端口,当前将这个grafana的监听端口改为55555,然后使用如下的命令启动即可
-
-```
-./bin/grafana-server web
-```
-然后通过浏览器访问http://<服务器IP地址>:55555,就可以验证grafana是否已成功安装。系统默认用户名和密码为admin/admin,第一次登陆系统会要求修改密码,修改密码后登陆。为了便于用户使用,当前已将RocketMQ的dashboard配置文件上传到Grafana的官网,地址为[https://grafana.com/dashboards/10477/revisions](https://grafana.com/dashboards/10477/revisions)去下载dashboard配置文件,用户只需要到下载配置文件,并将配置文件导入dashboard即可创建RocketMQ的dashboard
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rocketmq_exporter_setup_example_es.md b/rocketmq_exporter_setup_example_es.md
new file mode 100644
index 0000000..5e781b3
--- /dev/null
+++ b/rocketmq_exporter_setup_example_es.md
@@ -0,0 +1,57 @@
+# RocketMQ-Exporter Use example #
+
+## 1 Start up NameServer and Broker ##
+In order to use the RocketMQ Exporter, first make sure that the RocketMQ service is properly
downloaded and started. Users can refer to the quick start of the RocketMQ master station
for operation. Make sure the NameServer and Broker have started correctly.
+
+## 2 Compile RocketMQ-Exporter ##
+Users currently need to download the git source code and then compile it
+
+```
+git clone https://github.com/apache/rocketmq-exporter
+cd rocketmq-exporter
+mvn clean install
+```
+
+## 3 Configuration and startup ##
+RocketMQ-Exporter has the following running options
+
+operations | default value | meaning 
+---|---|---
+rocketmq.config.namesrvAddr | 127.0.0.1:9876 | MQ cluster nameSrv address 
+rocketmq.config.webTelemetryPath | /metrics | metric collection path 
+server.port | 5557 | HTTP service exposed port 
+
+The above running options can be changed either in the configuration file after downloading
the code or via the command line. The compiled jar package is called rocketmq-exporter-0.0.1-SNAPSHOT.jar,
which can be run as follows.
+
+```
+java -jar rocketmq-exporter-0.0.1-SNAPSHOT.jar [--rocketmq.config.namesrvAddr="127.0.0.1:9876"
...]
+```
+
+## 4 Install Prometheus ##
+First go to Prometheus official download address: https://prometheus.io/download/ to download
the Prometheus installation package, currently using linux installation as an example, the
selected installation package is Prometheus-2.7.0-rc.1.linux-amd64.tar.gz, the Prometheus
process can be started after the following steps.
+
+```
+tar -xzf prometheus-2.7.0-rc.1.linux-amd64.tar.gz
+cd prometheus-2.7.0-rc.1.linux-amd64/
+./prometheus --config.file=prometheus.yml --web.listen-address=:5555
+```
+
+The default listening port number of Prometheus is 9090. In order not  conflicts with other
processes on the system, we reset the listening port number to 5555 in the startup parameters.
Then go to website http://<server IP address>:5555 through  browser and users can verify
whether the Prometheus has been successfully installed. Since the RocketMQ-Exporter process
has been started, the data of RocketMQ-Exporter can be retrieved by Prometheus at this time.
At this time, users only need t [...]
+
+## 5 Creating Grafana dashboard for RocketMQ ##
+
+Prometheus' own metric display platform is not as good as Grafana. In order to  better show
RocketMQ's metrics, Grafana can be used to show the metrics that Prometheus gets. First go
to the official website https://grafana.com/grafana/download to download, here is a  an example
for binary file installation.
+
+```
+wget https://dl.grafana.com/oss/release/grafana-6.2.5.linux-amd64.tar.gz 
+tar -zxvf grafana-6.2.5.linux-amd64.tar.gz
+cd grafana-5.4.3/
+```
+Similarly, in order not to conflict with the ports of other processes, users can modify the
listening port of the defaults.ini file in the conf directory. Currently, the listening port
of the Grafana is changed to 55555, and then use the following command to start.
+
+```
+./bin/grafana-server web
+```
+
+Then, by accessing http://<server IP address>:55555 through the browser, users can
verify that the Grafana has been successfully installed. The system default username and password
are admin/admin. The first time users log in to the system, users will be asked to change
the password. In addition, users need to set Grafana's data source to Prometheus. For the
convenience of users, RocketMQ's dashboard configuration file has been uploaded to Grafana's
official website  https://grafana.com/ [...]
+


Mime
View raw message