prometheus过滤采集node_exporter数据
参考链接:
https://github.com/prometheus/node_exporter?tab=readme-ov-file#filtering-enabled-collectors
1.修改Prometheus server的配置文件
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
30 - job_name: "yanshier-node-exporter"
31 metrics_path: "/metrics"
32 scheme: "http"
33 # 配置参数
34 params:
35 collect[]:
36 - meminfo
37 static_configs:
38 - targets: ["10.0.0.41:9100","10.0.0.42:9100","10.0.0.43:9100"]
2.重新加载配置配置
[root@prometheus-server31 ~]# curl -X POST 10.0.0.31:9090/-/reload
[root@prometheus-server31 ~]#
3.验证测试
发现无法查询CPU相关的指标,但是可以查询内存的指标。
node_memory_MemTotal_bytes
node_cpu_seconds_total
4.底层原理说明
node_exporter是采集到数据了,这一点可以在相应节点测试。
http://10.0.0.43:9100/metrics
搜索: node_cpu_seconds_total
之所以Prometheus采集不到CPU指标,本质是是修改了访问的URL参数。
http://10.0.0.43:9100/metrics?collect[]=meminfo
编码后:
http://10.0.0.43:9100/metrics?collect%5B%5D=meminfo
搜索: node_cpu_seconds_total
prometheus监控zookeeper集群
1.修改zookeeper集群开启metric指标暴露
[root@elk91 ~]# vim /yanshier/softwares/apache-zookeeper-3.8.4-bin/conf/zoo.cfg
...
# https://prometheus.io Metrics Exporter
metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
metricsProvider.httpHost=0.0.0.0
metricsProvider.httpPort=7000
metricsProvider.exportJvmInfo=true
[root@elk91 ~]#
[root@elk91 ~]# scp /yanshier/softwares/apache-zookeeper-3.8.4-bin/conf/zoo.cfg 10.0.0.92:/yanshier/softwares/apache-zookeeper-3.8.4-bin/conf/zoo.cfg
[root@elk91 ~]#
[root@elk91 ~]# scp /yanshier/softwares/apache-zookeeper-3.8.4-bin/conf/zoo.cfg 10.0.0.93:/yanshier/softwares/apache-zookeeper-3.8.4-bin/conf/zoo.cfg
2.启动zookeeper集群
[root@elk91 ~]# zkServer.sh start
[root@elk92 ~]# zkServer.sh start
[root@elk93 ~]# zkServer.sh start
3.检查zookeeper集群是否正常
[root@elk91 ~]# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /yanshier/softwares/apache-zookeeper-3.8.4-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: follower
[root@elk91 ~]#
[root@elk92 ~]# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /yanshier/softwares/apache-zookeeper-3.8.4-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: follower
[root@elk92 ~]#
[root@elk93 ~]# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /yanshier/softwares/apache-zookeeper-3.8.4-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: leader
[root@elk93 ~]#
4.访问prometheus的metric接口
http://10.0.0.91:7000/metrics
http://10.0.0.92:7000/metrics
http://10.0.0.93:7000/metrics
5.修改Prometheus的配置文件
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
- job_name: "yanshier-zookeeper"
static_configs:
- targets:
- 10.0.0.91:7000
- 10.0.0.92:7000
- 10.0.0.93:7000
6.热加载配置
[root@prometheus-server31 ~]# curl -X POST 10.0.0.31:9090/-/reload
[root@prometheus-server31 ~]#
7.验证是否监控成功
http://10.0.0.31:9090/targets
8.导入grafana的ID
10465
prometheus监控kafka集群
1.启动kafka集群
[root@elk91 ~]# kafka-server-start.sh -daemon $KAFKA_HOME/config/server.properties
[root@elk92 ~]# kafka-server-start.sh -daemon $KAFKA_HOME/config/server.properties
[root@elk93 ~]# kafka-server-start.sh -daemon $KAFKA_HOME/config/server.properties
2.启动生产者
[root@elk91 ~]# kafka-console-producer.sh --bootstrap-server 10.0.0.92:9092 --topic yanshier-linux94
>111111111111111
[2024-11-12 02:56:55,457] WARN [Producer clientId=console-producer] Error while fetching metadata with correlation id 6 : {yanshier-linux94=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)
2>22222222222222
>333333333333333333333
>
3.启动消费者
[root@elk93 ~]# kafka-console-consumer.sh --bootstrap-server 10.0.0.91:9092 --topic yanshier-linux94 --from-beginning --consumer-property group.id=linux94
111111111111111
222222222222222
333333333333333333333
4.下载kafka_exporter
[root@elk91 ~]# wget https://github.com/danielqsj/kafka_exporter/releases/download/v1.8.0/kafka_exporter-1.8.0.linux-amd64.tar.gz
5.解压软件包
[root@elk91 ~]# tar xf kafka_exporter-1.8.0.linux-amd64.tar.gz -C /usr/local/bin/ kafka_exporter-1.8.0.linux-amd64/kafka_exporter --strip-components=1
6.启动kafka_exporter
[root@elk91 ~]# kafka_exporter --kafka.server=10.0.0.91:9092 --kafka.version="3.8.1" --web.listen-address=":9308" --web.telemetry-path="/metrics"
7.访问kafka_exporter的metrics接口
http://10.0.0.91:9308/metrics
8.Prometheus监控kafka_exporter
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
- job_name: "yanshier-kafka"
static_configs:
- targets:
- 10.0.0.91:9308
9.热加载配置
[root@prometheus-server31 ~]# curl -X POST 10.0.0.31:9090/-/reload
[root@prometheus-server31 ~]#
10.检查配置是否生效
http://10.0.0.31:9090/targets
11.grafna导入模板ID
12460
10122
Prometheus监控elasticSearch集群
1.下载elastcsearch_exporter
wget https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v1.8.0/elasticsearch_exporter-1.8.0.linux-amd64.tar.gz
2.解压软件包
[root@elk91 ~]# tar xf elasticsearch_exporter-1.8.0.linux-amd64.tar.gz -C /usr/local/bin/ elasticsearch_exporter-1.8.0.linux-amd64/elasticsearch_exporter --strip-components=1
3.启动elasticsearch_exporter
[root@elk91 ~]# elasticsearch_exporter --es.uri="http://elastic:123456@10.0.0.92:9200" --web.listen-address=:9114 --web.telemetry-path="/metrics"
level=info ts=2024-11-12T03:56:10.458466996Z caller=clusterinfo.go:214 msg="triggering initial cluster info call"
level=info ts=2024-11-12T03:56:10.458879438Z caller=clusterinfo.go:183 msg="providing consumers with updated cluster info label"
level=info ts=2024-11-12T03:56:10.520366346Z caller=main.go:244 msg="started cluster info retriever" interval=5m0s
level=info ts=2024-11-12T03:56:10.520832298Z caller=tls_config.go:313 msg="Listening on" address=[::]:9114
level=info ts=2024-11-12T03:56:10.520844867Z caller=tls_config.go:316 msg="TLS is disabled." http2=false address=[::]:9114
...
4.访问elasticsearch_exporter的metrics
http://10.0.0.91:9114/metrics
5.Prometheus修改配置文件
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
- job_name: "yanshier-elasticsearch"
static_configs:
- targets:
- 10.0.0.91:9114
6.热加载配置
[root@prometheus-server31 ~]# curl -X POST 10.0.0.31:9090/-/reload
[root@prometheus-server31 ~]#
7.检查配置是否生效
http://10.0.0.31:9090/targets
8.grafna导入模板ID
14191
Prometheus监控mysql
1.下载mysql_exporter
wget https://github.com/prometheus/mysqld_exporter/releases/download/v0.16.0/mysqld_exporter-0.16.0.linux-amd64.tar.gz
2.解压软件包
[root@elk92 ~]# tar xf mysqld_exporter-0.16.0.linux-amd64.tar.gz -C /usr/local/bin/ mysqld_exporter-0.16.0.linux-amd64/mysqld_exporter --strip-components=1
3.启动MySQL数据库
[root@elk93 ~]# docker run -d --network host --name db -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_USER=linux94 -e MYSQL_PASSWORD=yanshier mysql:8.0.36-oracle
[root@elk93 ~]# docker exec -it db mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.36 MySQL Community Server - GPL
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> SELECT user,host,plugin FROM mysql.user;
+------------------+-----------+-----------------------+
| user | host | plugin |
+------------------+-----------+-----------------------+
| linux94 | % | caching_sha2_password |
| root | % | caching_sha2_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session | localhost | caching_sha2_password |
| mysql.sys | localhost | caching_sha2_password |
| root | localhost | caching_sha2_password |
+------------------+-----------+-----------------------+
6 rows in set (0.00 sec)
mysql>
mysql> GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO linux94;
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> SHOW GRANTS FOR linux94;
+-------------------------------------------------------------------+
| Grants for linux94@% |
+-------------------------------------------------------------------+
| GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO `linux94`@`%` |
+-------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql>
mysql>
4.启动mysql_exporter
[root@elk92 ~]# cat /root/.my.cnf
[client]
user=linux94
password=yanshier
[root@elk92 ~]#
[root@elk92 ~]# mysqld_exporter --web.listen-address=:9104 --web.telemetry-path="/metrics" --mysqld.address="10.0.0.93:3306" --config.my-cnf="/root/.my.cnf"
5.访问metrics测试
http://10.0.0.92:9104/metrics
6.修改Prometheus的配置文件
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
- job_name: "yanshier-mysqld"
static_configs:
- targets:
- 10.0.0.92:9104
7.热加载配置
[root@prometheus-server31 ~]# curl -X POST 10.0.0.31:9090/-/reload
8.检查配置是否生效
http://10.0.0.31:9090/targets
9.grafana导入模板ID
17320
18949
Prometheus监控Redis
1.部署redis环境
[root@elk93 ~]# apt -y install redis
[root@elk93 ~]# sed -i '/^bind/s#127.0.0.1 ::1#0.0.0.0#' /etc/redis/redis.conf
[root@elk93 ~]#
[root@elk93 ~]# systemctl restart redis-server
[root@elk93 ~]#
[root@elk93 ~]# ss -ntl | grep 6379
LISTEN 0 511 0.0.0.0:6379 0.0.0.0:*
[root@elk93 ~]#
[root@elk93 ~]# redis-cli -n 5 --raw
127.0.0.1:6379[5]> KEYS *
127.0.0.1:6379[5]>
127.0.0.1:6379[5]> set school yanshier
OK
127.0.0.1:6379[5]>
127.0.0.1:6379[5]> LPUSH hobby K8S docker prometheus
3
127.0.0.1:6379[5]>
127.0.0.1:6379[5]> KEYS *
hobby
school
127.0.0.1:6379[5]>
127.0.0.1:6379[5]> TYPE hobby
list
127.0.0.1:6379[5]>
127.0.0.1:6379[5]> TYPE school
string
127.0.0.1:6379[5]>
2.下载redis_exporter
wget https://github.com/oliver006/redis_exporter/releases/download/v1.66.0/redis_exporter-v1.66.0.linux-amd64.tar.gz
3.解压软件包
[root@elk92 ~]# tar xf redis_exporter-v1.66.0.linux-amd64.tar.gz -C /usr/local/bin/ redis_exporter-v1.66.0.linux-amd64/redis_exporter --strip-components=1
4.启动redis_exporter
[root@elk92 ~]# redis_exporter -web.listen-address=:9121 -web.telemetry-path=/metrics -redis.addr=redis://10.0.0.93:6379
5.访问metrics测试
http://10.0.0.92:9121/metrics
6.修改Prometheus的配置文件
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
- job_name: "yanshier-redis"
static_configs:
- targets:
- 10.0.0.92:9121
7.热加载配置
[root@prometheus-server31 ~]# curl -vvv -X POST 10.0.0.31:9090/-/reload
8.检查配置是否生效
http://10.0.0.31:9090/targets
9.grafana导入模板ID
763
14091
14615
grafana实现插件安装
1.安装插件
[root@grafana51 ~]# grafana-cli plugins install natel-discrete-panel
✔ Downloaded and extracted natel-discrete-panel v0.1.1 zip successfully to /var/lib/grafana/plugins/natel-discrete-panel
Please restart Grafana after installing or removing plugins. Refer to Grafana documentation for instructions if necessary.
[root@grafana51 ~]#
[root@grafana51 ~]# ll /var/lib/grafana/plugins/
total 12
drwxr-xr-x 3 root root 4096 Nov 12 15:29 ./
drwxr-xr-x 6 grafana grafana 4096 Nov 12 15:29 ../
drwxr-xr-x 4 root root 4096 Nov 12 15:29 natel-discrete-panel/
[root@grafana51 ~]#
2.重启服务使得配置生效
[root@grafana51 ~]# systemctl restart grafana-server
[root@grafana51 ~]#
[root@grafana51 ~]#
3.访问WebUI测试
Prometheus监控nginx
1 编译安装nginx
1.1 安装编译工具
[root@elk92 ~]# apt -y install git wget gcc make zlib1g-dev build-essential libtool openssl libssl-dev
1.2 克隆nginx-module-vts模块
git clone git://github.com/vozlt/nginx-module-vts.git
如果上述连接不好用,可以执行下面代码:
git clone https://gitee.com/jasonyin2020/nginx-module-vts.git
1.3 下载nginx软件包
wget https://nginx.org/download/nginx-1.27.2.tar.gz
1.4 解压nginx
tar xf nginx-1.27.2.tar.gz
1.5 配置nginx
[root@elk92 ~]# cd nginx-1.27.2/
[root@elk92 nginx-1.27.2]#
[root@elk92 nginx-1.27.2]# ./configure --prefix=/yanshier/softwares/nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --without-http_rewrite_module --with-http_stub_status_module --without-http_gzip_module --with-file-aio --with-stream --with-stream_ssl_module --with-stream_realip_module --add-module=/root/nginx-module-vts
1.6 编译并安装nginx
make -j 2 && make install
1.7 修改nginx的配置文件
vim /yanshier/softwares/nginx/conf/nginx.conf
...
http {
vhost_traffic_status_zone;
upstream yanshier-grafana {
server 10.0.0.51:3000;
}
...
server {
...
location / {
root html;
# index index.html index.htm;
proxy_pass http://yanshier-grafana;
}
location /status {
vhost_traffic_status_display;
vhost_traffic_status_display_format html;
}
}
}
1.8 检查配置文件语法
[root@elk92 ~]# /yanshier/softwares/nginx/sbin/nginx -t
nginx: the configuration file /yanshier/softwares/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /yanshier/softwares/nginx/conf/nginx.conf test is successful
[root@elk92 ~]#
1.9 启动nginx
[root@elk92 ~]# /yanshier/softwares/nginx/sbin/nginx
[root@elk92 ~]#
[root@elk92 ~]# ss -ntl | grep 80
LISTEN 0 511 0.0.0.0:80 0.0.0.0:*
[root@elk92 ~]#
1.10 访问nginx的状态页面
http://10.0.0.92/status
http://10.0.0.92/status/format/prometheus
2 安装nginx-vtx-exporter
2.1 下载nginx-vtx-exporter
CentOS:(不支持更高版本)
wget https://github.com/hnlq715/nginx-vts-exporter/releases/download/v0.10.3/nginx-vts-exporter-0.10.3.linux-amd64.tar.gz
温馨提示:
不建议下载更高版本,因为其会提升对GLIC的版本要求,可以通过" strings /lib64/libc.so.6 | grep GLIBC_ "查看默认是2.17版本,若使用较高版本则需要2.32+
Ubuntu可以采用:
[root@elk93 ~]# wget https://github.com/sysulq/nginx-vts-exporter/releases/download/v0.10.8/nginx-vtx-exporter_0.10.8_linux_amd64.tar.gz
2.2 解压软件包到path路径
[root@elk93 ~]# tar xf nginx-vtx-exporter_0.10.8_linux_amd64.tar.gz -C /usr/local/bin/ nginx-vtx-exporter
[root@elk93 ~]#
2.3 运行nginx-vtx-exporter
[root@elk93 ~]# nginx-vtx-exporter -nginx.scrape_uri=http://10.0.0.92/status/format/json -telemetry.address=:9913 -telemetry.endpoint=/metrics
...
2024/11/12 16:34:50 Starting nginx_vts_exporter (version=, branch=, revision=)
2024/11/12 16:34:50 Build context (go=go1.20.5, user=, date=)
2024/11/12 16:34:50 Starting Server at : :9913
2024/11/12 16:34:50 Metrics endpoint: /metrics
2024/11/12 16:34:50 Metrics namespace: nginx
2024/11/12 16:34:50 Scraping information from : http://10.0.0.92/status/format/json
3 配置prometheus采集nginx数据
3.1 修改配置文件
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
scrape_configs:
...
- job_name: "yanshier-nginx"
static_configs:
- targets:
- 10.0.0.93:9913
3.2 重新加载配置
[root@prometheus-server31 ~]# curl -X POST 10.0.0.31:9090/-/reload
[root@prometheus-server31 ~]#
3.3 检查配置是否生效
http://10.0.0.31:9090/targets
3.4 导入grafana模板
2949
Prometheus监控tomcat
1.下载
[root@elk93 ~]# wget http://192.168.13.253/Resources/Prometheus/softwares/tomcat_exporter/tomcat_exporter.zip
2.解压软件包
[root@elk93 ~]# mkdir /yanshier/softwares/tomcat
[root@elk93 ~]#
[root@elk93 ~]# unzip tomcat_exporter.zip -d /yanshier/softwares/tomcat
[root@elk93 ~]#
3.编译镜像
[root@elk93 ~]# cd /yanshier/softwares/tomcat
[root@elk93 tomcat]#
[root@elk93 tomcat]# chmod +x build.sh
[root@elk93 tomcat]#
[root@elk93 tomcat]# wget http://192.168.13.253/Resources/Prometheus/images/yanshier-tomcat-v9.0.87.tar.gz
[root@elk93 tomcat]#
[root@elk93 tomcat]# docker load -i yanshier-tomcat-v9.0.87.tar.gz
[root@elk93 tomcat]#
[root@elk93 tomcat]# ./build.sh
4.启动tomcat实例
[root@elk93 tomcat]# docker run -d --name tomcat-server --network host --restart always harbor.yanshier.com/tomcat/tomcat-app:v2
dc07d5e0222150bab62e340f8ca495541413e902e6e0a1d947e69e529c5ebc19
[root@elk93 tomcat]#
[root@elk93 tomcat]# ss -ntl | grep 8080
LISTEN 0 100 *:8080 *:*
[root@elk93 tomcat]#
5.访问测试metrics
http://10.0.0.93:8080/myapp/
http://10.0.0.93:8080/metrics/
6.修改Prometheus的配置文件
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
- job_name: "yanshier-tomcat"
static_configs:
- targets:
- 10.0.0.93:8080
7.热加载配置
[root@prometheus-server31 ~]# curl -X POST 10.0.0.31:9090/-/reload
8.检查配置是否生效
http://10.0.0.31:9090/targets
9.grafana导入模板ID
自行导入模板文件。
参考链接:
https://github.com/nlighten/tomcat_exporter/blob/master/dashboard/example.json
Prometheus监控docker容器
1 cAdvisor概述
cAdvisor(Container Advisor)让容器用户了解其运行容器的资源使用情况和性能特征。
它是一个正在运行的守护进程,用于收集、聚合、处理和导出有关正在运行的容器的信息。
具体来说,对于每个容器,它保留资源隔离参数、历史资源使用情况、完整历史资源使用的直方图和网络统计信息。
官网地址:
https://github.com/google/cadvisor
2 部署cAdvisor容器
docker run --volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--publish=18080:8080 \
--detach=true \
--name=yanshier_cadvisor \
registry.cn-hangzhou.aliyuncs.com/yinzhengjie-k8s/cadvisor:v0.47.2
3.访问测试
http://10.0.0.93:18080/metrics
4.修改Prometheus的配置文件
[root@prometheus-server31 ~]# vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
...
scrape_configs:
...
- job_name: "yanshier-docker"
static_configs:
- targets:
- 10.0.0.93:18080
5.重载配置
[root@prometheus-server31 ~]# curl -X POST 10.0.0.31:9090/-/reload
[root@prometheus-server31 ~]#
6 验证配置是否生效
http://10.0.0.31:9090/targets
7.导入grafana模板
315
10619
- Prometheus监控服务流程
- 1.验证被监控端服务是否启动; 【mysql】
- 2.检测服务对应的exporter是否正常启动; (/metrics)【mysql_exporter】
- 3.prometheus server配置监控exporter
- 4.热加载配置并验证是否生效;
- 5.grafana导入模板ID
MongoDB配置Prometheus监控
下载镜像
[root@elk93:~]# docker pull mongodb/mongodb-community-server:6.0.4-ubuntu2204
部署容器
[root@elk93:~]# docker run -d --name mongdb --network host mongodb/mongodb-community-server:6.0.4-ubuntu2204
上传mongodb_exporter-0.42.0.linux-amd64.tar.gz--"F:\Prometheus监控\windows_exporter-0.29.2-amd64.exe"
tar xf mongodb_exporter-0.42.0.linux-amd64.tar.gz -C /usr/local/bin
cd /usr/local/bin
移动目录文件到当前
最后运行
root@elk93:~# mongodb_exporter --mongodb.uri=mongodb://10.0.0.93:27017
修改Prometheus配置文件
vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
- job_name: "yanshier-mongdb"
static_configs:
- targets:
- 10.0.0.93:9216
浏览器访问测试
-------------------------------------
Prometheus监控windows系统
直接点击文件运行cmd查看端口
"F:\Prometheus监控\windows_exporter-0.29.2-amd64.exe"
修改Prometheus配置文件
vim /yanshier/softwares/prometheus-2.53.3.linux-amd64/prometheus.yml
- job_name: "yanshier-wendins"
static_configs:
- targets:
- 10.0.0.1:9182
标签:10.0,exporter,服务,promethus,--,yanshier,prometheus,监控,root
From: https://www.cnblogs.com/yanshier/p/18687663