一.項目介紹
1.流程圖
2.拓?fù)鋱D
3.詳細(xì)介紹
項目名稱:基于Docker的Prometheus+Grafana+AlertManager的飛書監(jiān)控報警平臺
項目環(huán)境:CentOS7.9,Docker24.0.5,Prometheus2.47,Grafana10.1.2,AlertManager0.23,Nginx1.25.2,MySQL5.7.43、ansible 2.9.27等
項目描述:旨在構(gòu)建一個高可用的監(jiān)控和報警系統(tǒng),基于Docker技術(shù),結(jié)合Prometheus、Grafana和AlertManager等工具,用于監(jiān)控多臺服務(wù)器上的應(yīng)用程序、資源使用情況以及性能數(shù)據(jù)。通過整合飛書機器人實現(xiàn)實時報警通知,以便及時響應(yīng)并解決潛在的問題。
項目步驟:
1.提前規(guī)劃好ip并建立免密通道,使用Ansible自動化批量部署docker環(huán)境
2.使用docker部署nginx和MySQL并配置cadvisor和exporter獲得節(jié)點數(shù)據(jù)
3.使用docker在兩臺監(jiān)控機器上部署Prometheus對Web服務(wù)器和MySQL服務(wù)器實時監(jiān)控
4.配置AlertManager添加報警模板和使用飛書群聊機器人的密鑰開啟提醒服務(wù)進(jìn)行預(yù)警
5.測試飛書預(yù)警情況并部署Grafana對Web服務(wù)器和MySQL服務(wù)器出圖
項目心得:
1.提前規(guī)劃好整個集群的架構(gòu),可以提高項目開展時效率
2.體會了自動化部署的重要性和容器化技術(shù)的好處,使組件部署和管理更加輕松
3.明白了監(jiān)控與報警的關(guān)鍵性和重要性以及數(shù)據(jù)可視化的價值
二.前期準(zhǔn)備
1.項目環(huán)境
CentOS7.9,Docker24.0.5,Prometheus2.47,Grafana10.1.2,AlertManager0.23,Nginx 1.25.2,MySQL5.7.43、ansible 2.9.27等
2.IP劃分
準(zhǔn)備全新的centos7.9的虛擬機,并且分配IP地址:
主機名 | IP |
---|---|
ansible | 192.168.98.156 |
promethus服務(wù)器 | 192.168.98.155 |
grafana服務(wù)器 | 192.168.98.154 |
alertmanager | 192.168.98.140 |
MySQL服務(wù)器 | 192.168.98.149 |
nginx服務(wù)器 | 192.168.98.136 |
三. 項目步驟
1.ansible部署軟件環(huán)境
提前規(guī)劃好ip并建立免密通道,使用Ansible自動化批量部署docker環(huán)境
1.1 安裝ansible環(huán)境
[root@localhost ~]# yum install epel-release -y
[root@localhost ~]# yum install ansible -y
[root@localhost ~]# vim /etc/ansible/hosts
[nginx]
192.168.98.136
[mysql]
192.168.98.140
[promethus]
192.168.98.155
[grafana]
192.168.98.154
[alertmanager]
192.168.98.140
1.2 建立免密通道
[root@localhost ~]# ssh-keygen -t rsa
[root@localhost ~]# cd .ssh
[root@localhost .ssh]# ls
id_rsa id_rsa.pub known_hosts
[root@localhost .ssh]# ssh-copy-id -i id_rsa.pub root@192.168.98.136
[root@localhost .ssh]# ssh-copy-id -i id_rsa.pub root@192.168.98.140
[root@localhost .ssh]# ssh-copy-id -i id_rsa.pub root@192.168.98.155
[root@localhost .ssh]# ssh-copy-id -i id_rsa.pub root@192.168.98.154
[root@localhost .ssh]# ssh-copy-id -i id_rsa.pub root@192.168.98.140
1.3 批量部署docker
1.安裝docker
[root@localhost ~]# vim onekey_install_docker.sh
#!/bin/bash
#安裝yum-utils工具包
yum install yum-utils -y
#下載docker-ce.repo文件存放在/etc/yum.repos.d
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#安裝docker-ce相關(guān)軟件
yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
#關(guān)閉firewalld防火墻服務(wù),并且設(shè)置開機不要啟動
service firewalld stop
systemctl disable firewalld
#臨時關(guān)閉selinux
setenforce 0
#永久關(guān)閉selinux
sed -i '/^SELINUX=/ s/enforcing/disabled/' /etc/selinux/config
#啟動docker并設(shè)計開機啟動
systemctl start docker
systemctl enable docker
[root@ansible ~]# vim software_install.yaml
- hosts: nginx mysql promethus grafana
remote_user: root
tasks:
- name: copy onekey_install_docker.sh #上傳onekey_install_docker.sh腳本
copy: src=/root/onekey_install_docker.sh dest=/root/
- name: install mysql #安裝docker
script: /root/onekey_install_docker.sh
[root@localhost ~]# ansible-playbook software_install.yaml
2 部署nginx、MySQL以及cadvisor、exporter節(jié)點
使用docker部署nginx和MySQL并配置cadvisor和exporter獲得節(jié)點數(shù)據(jù)
2.1 在nginx節(jié)點服務(wù)器上面配置nginx、node_exporter和cadvisor
CAdvisor是谷歌開發(fā)的用于分析運行中容器的資源占用和性能指標(biāo)的開源工具。CAdvisor是一個運行時的守護(hù)進(jìn)程,負(fù)責(zé)收集、聚合、處理和輸出運行中容器的信息。
Node-exporter 可以采集機器(物理機、虛擬機、云主機)的監(jiān)控指標(biāo)數(shù)據(jù),能夠采集到的指標(biāo)包括cpu、內(nèi)存、磁盤、網(wǎng)絡(luò)、文件數(shù)等信息。
#拉取鏡像
[root@localhost /]# docker pull nginx
[root@localhost /]# docker pull prom/node-exporter
[root@localhost /]# docker pull google/cadvisor
#啟動nginx
[root@localhost /]# docker run --name nginx-1 -p 80:80 -d nginx
# 啟動node-exporter
[root@localhost /]# docker run -d --name nginx-node --restart=always -p 9100:9100 -v "/proc:/host/proc:ro" -v "/sys:/host/sys:ro" -v "/:/rootfs:ro" prom/node-exporter
#啟動cAdvisor采集容器
[root@localhost /]# docker run -d \
-d --name=nginx-cadvisor \
--restart always \
-v /:/rootfs:ro \
-v /var/run:/var/run:ro \
-v /sys:/sys:ro \
-v /var/lib/docker/:/var/lib/docker:ro \
-v /dev/disk/:/dev/disk:ro \
-p 8080:8080 \
google/cadvisor:latest
編寫腳本監(jiān)控nginx服務(wù)運行情況
[root@localhost ~]# vim /root/check_nginx.sh
#!/bin/bash
# 檢測Nginx容器是否在運行
if docker ps | grep -q "nginx-1"; then
docker restart nginx-node
else
docker stop nginx-node
fi
#定義一個每分鐘執(zhí)行該腳本的計劃任務(wù),用來監(jiān)控nginx服務(wù)器有沒有掛掉
[root@localhost ~]# crontab -l
* * * * * bash /root/check_nginx.sh
輸入http://192.168.98.136:8080訪問,查看容器內(nèi)部的情況
輸入http://192.168.98.136:9100訪問,查看收集的數(shù)據(jù)
輸入http://192.168.98.136:80訪問,查看nginx Web服務(wù)器
2.2 在MySQL節(jié)點服務(wù)器上面配置MySQL、mysqld-exporter和cadvisor
#拉取鏡像
[root@localhost /]# docker pull mysql:5.7.43
[root@localhost /]# docker pull prom/mysqld-exporter
[root@localhost /]# docker pull google/cadvisor
#啟動mysql:5.7
[root@localhost /]# docker run --name mysql-1 -e MYSQL_ROOT_PASSWORD=123456 -d -p 3306:3306 mysql:5.7.43
# 啟動node-exporter
[root@localhost /]# docker run -d --name mysql-exporter -p 9104:9104 -e DATA_SOURCE_NAME="root:123456@(192.168.98.140:3306)/mysql" prom/mysqld-exporter
#啟動cAdvisor采集容器
[root@localhost /]# docker run -d \
--name=mysql-cadvisor \
--restart always \
-v /:/rootfs:ro \
-v /var/run:/var/run:ro \
-v /sys:/sys:ro \
-v /var/lib/docker/:/var/lib/docker:ro \
-v /dev/disk/:/dev/disk:ro \
-p 8080:8080 \
google/cadvisor:latest
輸入http://192.168.98.149:8080訪問,查看容器內(nèi)部的情況
輸入http://192.168.98.149:9104訪問,查看收集的數(shù)據(jù)
3.安裝promethues
使用docker在兩臺監(jiān)控機器上部署Prometheus對Web服務(wù)器和MySQL服務(wù)器實時監(jiān)控
3.1 在promethues服務(wù)器上面使用docker部署promethues
#拉取鏡像
[root@localhost ~]# docker pull prom/prometheus
# 啟動容器
[root@localhost ~]# docker run -itd --name docker_prometheus prom/prometheus
# 復(fù)制容器內(nèi)部的配置文件到宿主機當(dāng)前目錄下的/prometheus
[root@localhost ~]# docker cp -a docker_prometheus:/etc/prometheus/ $PWD/prometheus
# 刪除容器
[root@localhost ~]# docker rm -f docker_prometheus
# 啟動容器 設(shè)置端口
[root@localhost ~]# docker run -itd --name docker_prometheus --restart=always -p 9090:9090 -v $PWD/prometheus:/etc/prometheus/ prom/prometheus
# docker run 運行
# --name 容器的名稱
# -p 指定容器的端口映射
# -v 將本地路徑映射到容器內(nèi)(這樣如果修改了本地的文件,只需restart容器即可在容器內(nèi)生效)
# --restart 容器重啟策略 no不重啟,always 退出時總是重啟
# prom/prometheus 選擇鏡像名稱啟動容器
#查看容器運行情況
[root@localhost ~]# docker ps|grep docker_prometheus
3.2 修改prometheus配置文件
修改prometheus配置文件/root/prometheus/prometheus.yml
#修改prometheus配置文件
[root@localhost prometheus]# vim prometheus.yml
# 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).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets: ["192.168.98.140:9093"] # 告警配置地址
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
- "*rule.yml" #告警通知文件信息
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ["localhost:9090"]
- job_name: "node-exporter"
static_configs:
- targets: ["192.168.98.136:9100"]
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ["localhost:9090"]
- job_name: "node-exporter"
static_configs:
- targets: ["192.168.98.136:9100"]
- job_name: "nginx-cadvisor"
static_configs:
- targets: ["192.168.98.136:8080"]
- job_name: "mysqld-exporter"
static_configs:
- targets: ["192.168.98.149:9104"]
- job_name: "mysql-cadvisor"
static_configs:
- targets: ["192.168.98.149:8080"]
[root@localhost prometheus]# docker restart docker_prometheus
輸入http://192.168.98.155:9090訪問,查看狀態(tài)
4.安裝AlertManager并添加報警模板
配置AlertManager添加報警模板和使用飛書群聊機器人的密鑰開啟提醒服務(wù)進(jìn)行預(yù)警
4.1 在AlertManager服務(wù)器上配置AlertManager和prometheus-webhook-feishu
#拉取鏡像
[root@localhost ~]# docker pull prom/alertmanager
#啟動容器
[root@localhost ~]# docker run -itd --name alertmanager prom/alertmanager
#復(fù)制容器內(nèi)部的配置文件到宿主機,不用事先創(chuàng)建$PWD/alertmanager目錄
[root@localhost ~]# docker cp -a alertmanager:/etc/alertmanager/ $PWD/alertmanager
#刪除容器
[root@localhost ~]# docker rm -f alertmanager
#啟動服務(wù) 設(shè)置端口9093
[root@localhost ~]# docker run -itd --name alertmanager -p 9093:9093 -v $PWD/alertmanager:/etc/alertmanager prom/alertmanager
飛書上面創(chuàng)建群聊,添加聊天機器人,設(shè)置關(guān)鍵字,獲取密鑰
啟用飛書群聊機器人的密鑰進(jìn)行預(yù)警
#拉取鏡像
[root@localhost alertmanager]# docker pull javafamily/prometheus-webhook-feishu:2.3.2-SNAPSHOT
#安裝容器
[root@localhost alertmanager]# docker run -d --name prom-alert-feishu -p 9094:8080 --restart=always \
-e FEISHU_TOKEN=bc55cbd2-c892-41c7-8fc1-66df876bcfc4 \
javafamily/prometheus-webhook-feishu:2.3.2-SNAPSHOT
4.2 修改alertmanager配置文件
修改alertmanager配置文件/root/alertmanager/vim alertmanager.yml
[root@localhost alertmanager]# vim alertmanager.yml
route: # 根據(jù)標(biāo)簽匹配,確定當(dāng)前告警應(yīng)該如何處理;
group_by: ['alertname'] # 告警應(yīng)該根據(jù)那些標(biāo)簽進(jìn)行分組,不分組可以指定 ...
group_wait: 10s # 組告警等待時間。如果有同組告警一起發(fā)出,這個是為了把更多的告警一個批次發(fā)出去
group_interval: 10s # 同一組的多批次告警間隔多少秒后,才能發(fā)出
repeat_interval: 5m # 重復(fù)的告警要等待多久后才能再次發(fā)出去
receiver: 'webhook'
routes:
- receiver: webhook
group_wait: 10s
match:
alertname: alertname
receivers: # 接收人是一個抽象的概念,它可以是一個郵箱也可以是微信,Slack或者Webhook等,接收人一般配合告警路由使用;
- name: 'webhook'
webhook_configs:
- url: 'http://192.168.98.140:9094/alert/card'
inhibit_rules: # 合理設(shè)置抑制規(guī)則可以減少垃圾告警的產(chǎn)生 比如說當(dāng)我們的主機掛了,可能引起主機上的服務(wù),數(shù)據(jù)庫,中間件等一些告警,假如說后續(xù)的這些告警相對來說沒有意義,我們可以用抑制項這個功能,讓PrometheUS只發(fā)出主機掛了的告警。
- source_match: 根據(jù)label匹配源告警
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance'] # 處的集合的label,在源和目的里的值必須相等。如果該集合的內(nèi)的值再源和目的里都沒有,那么目的告警也會被抑制。
[root@localhost alertmanager]# docker restart alertmanager
3.4 修改prometheus配置文件,添加報警模板配置文件
3.4.2 添加報警模板配置文件
添加報警模板配置文件/root/prometheus/node-exporter-record-rule.yml和/root/prometheus/mysql-exporter-record-rule.yml
[root@localhost prometheus]# vim node-exporter-record-rule.yml
groups:
- name: nginx-alarm
rules:
- alert: "內(nèi)存告警"
expr: (1 - (node_memory_MemAvailable_bytes / (node_memory_MemTotal_bytes))) * 100 > 80 #正常情況下是80,這里寫了5,是因為我看到真實使用是8,為了>做告警出發(fā),寫了5
for: 5s
labels:
severity: warning
annotations:
title: "內(nèi)存使用率預(yù)警"
serviceName: "{{ $labels.serviceName }}"
instance: "{{ $labels.instance }}"
value: "{{ $value }}"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.154:3000/grafana/d/aka/duo-job-ji-cheng-fu-wu-qi-jian-kong"
template: "**${serviceName}**(${instance}) 內(nèi)存使用率已經(jīng)超過閾值 **80%**, 請及時處理!\n當(dāng)前值: ${value}%"
- alert: "CPU告警"
expr: (1 - avg(irate(node_cpu_seconds_total{mode="idle"}[2m])) by(instance)) * 100 > 80
for: 5s
labels:
severity: warning
annotations:
title: "CPU使用率預(yù)警"
serviceName: "{{ $labels.serviceName }}"
value: "{{ $value }}"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.154:3000/grafana/d/aka/duo-job-ji-cheng-fu-wu-qi-jian-kong"
template: "**${serviceName}**(${instance}) cpu使用率已經(jīng)超過閾值 **80%**, 請及時處理!\n當(dāng)前值: ${value}%"
- alert: "磁盤告警"
expr: 100 - (node_filesystem_free_bytes{fstype=~"tmpfs|ext4"} / node_filesystem_size_bytes{fstype=~"tmpfs|ext4"} * 100) > 5
for: 5s
labels:
severity: warning
annotations:
title: "磁盤使用率預(yù)警"
serviceName: "{{ $labels.serviceName }}"
instance: "{{ $labels.instance }}"
mountpoint: "{{ $labels.mountpoint }}"
value: "{{ $value }}"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.154:3000/grafana/d/aka/duo-job-ji-cheng-fu-wu-qi-jian-kong"
template: "**${serviceName}**(${instance}) 服務(wù)器磁盤設(shè)備使用率超過 **90%**, 請及時處理!\n掛載點: ${mountpoint}\n當(dāng)前值: ${value}%!"
- alert: "實例存活報警"
expr: up == 0
for: 5s
labels:
severity: emergency
annotations:
title: "節(jié)點宕機報警"
serviceName: "{{ $labels.serviceName }}"
instance: "{{ $labels.instance }}"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.155:9090/targets"
template: "節(jié)點 **${serviceName}**(${instance}) 斷聯(lián), 請及時處理!"
[root@localhost prometheus]# vim mysql-exporter-record-rule.yml
groups:
- name: mysql-alarm
rules:
- alert: "MySql服務(wù)存活預(yù)警"
expr: mysql_up == 0
for: 5s
labels:
severity: emergency
annotations:
title: "MySql服務(wù)宕機報警"
summary: "{{$labels.instance}}: 檢測到 MySql服務(wù) 已停止運行!請重點關(guān)注!??!"
description: "{{$labels.instance}}: 當(dāng)前 MySql服務(wù)已停止! (當(dāng)前狀態(tài)mysql_up狀態(tài)為:{{ $value }})"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.155:9090/targets"
- alert: "MySql_High_QPS過高預(yù)警"
expr: rate(mysql_global_status_questions[5m]) > 1500
for: 5s
labels:
severity: warning
annotations:
summary: "{{$labels.instance}}: 檢測到 MySql_High_QPS 過高!"
description: "{{$labels.instance}}: 當(dāng)前 MySql操作超過 1500/秒 (當(dāng)前值為:{{ $value }})"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.154:3000/grafana/d/aka/duo-job-ji-cheng-fu-wu-qi-jian-kong"
- alert: " MySql連接過多預(yù)警"
expr: rate(mysql_global_status_threads_connected[5m]) > 300
for: 5s
labels:
severity: warning
annotations:
summary: "{{$labels.instance}}: 檢測到 MySql 連接過多!"
description: "{{$labels.instance}}: 當(dāng)前 MySql連接超過 300個/秒 (當(dāng)前值為:{{ $value }})"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.154:3000/grafana/d/aka/duo-job-ji-cheng-fu-wu-qi-jian-kong"
- alert: " MySql慢查詢過多預(yù)警"
expr: rate(mysql_global_status_slow_queries[5m]) > 5
for: 5s
labels:
severity: warning
annotations:
summary: "{{$labels.instance}}: 檢測到 MySql 慢查詢過多!"
description: "{{$labels.instance}}: 當(dāng)前 MySql慢查詢 超過 5個/秒 (當(dāng)前值為:{{ $value }})"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.154:3000/grafana/d/aka/duo-job-ji-cheng-fu-wu-qi-jian-kong"
- alert: " SQL線程停止預(yù)警"
expr: mysql_slave_status_slave_sql_running != 1
for: 5s
labels:
severity: warning
annotations:
summary: "{{$labels.instance}}: 檢測到 SQL 線程停止!請重點關(guān)注?。?!"
description: "{{$labels.instance}}: 當(dāng)前 SQL線程 已停止! (當(dāng)前值為:{{ $value }})"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.154:3000/grafana/d/aka/duo-job-ji-cheng-fu-wu-qi-jian-kong"
- alert: "IO線程停止預(yù)警"
expr: mysql_slave_status_slave_io_running != 1
for: 5s
labels:
severity: warning
annotations:
summary: "{{$labels.instance}}: 檢測到 IO 線程停止!請重點關(guān)注?。?!"
description: "{{$labels.instance}}: 當(dāng)前 IO線程 已停止! (當(dāng)前值為:{{ $value }})"
btn: "點擊查看詳情 :玫瑰:"
link: "http://192.168.98.154:3000/grafana/d/aka/duo-job-ji-cheng-fu-wu-qi-jian-kong"
[root@localhost prometheus]# docker restart docker_prometheus
訪問http://192.168.98.155:9090/rules,查看報警信息詳細(xì)
5.測試預(yù)警情況并部署Grafana出圖
5.1 在Grafana服務(wù)器上面使用docker部署Grafana
#拉去鏡像
[root@localhost ~]# docker pull grafana/grafana
# 啟動grafana
[root@localhost ~]# docker run -itd --name grafana grafana/grafana
# 復(fù)制容器內(nèi)部的配置文件到宿主機當(dāng)前目錄下的/prometheus目錄下
[root@localhost ~]# docker cp -a grafana:/var/lib/grafana $PWD/grafana-storage
# 刪除容器
[root@localhost ~]# docker rm -f grafana
# 添加目錄權(quán)限(不添加權(quán)限不夠,容器無法啟動)
[root@localhost ~]# chmod -R 777 grafana-storage
# 啟動容器 設(shè)置端口
[root@localhost ~]# docker run -itd --name=grafana --restart=always -p 3000:3000 -v $PWD/grafana-storage:/var/lib/grafana grafana/grafana
# docker run 運行
# --name 容器的名稱
# -p 指定容器的端口映射
# -v:掛載宿主機目錄和docker容器中的目錄; $PWD/grafana-storage:本地宿主機絕對目錄;/var/lib/grafana:容器目錄(將容器目錄掛載到本地)
# --restart 容器重啟策略 no:不重啟,always:退出時總是重啟
# grafana/grafana 選擇鏡像名稱啟動容器
[root@localhost ~]# docker ps
輸入http://192.168.98.154:3000訪問,默認(rèn)賬號和密碼都是admin
選擇一個模板導(dǎo)入promethus的數(shù)據(jù)
5.2 測試飛書預(yù)警情況
隨機停掉一個服務(wù),觀察報警效果
重啟服務(wù)
四. 項目總結(jié)
1.做項目時遇到的問題
1.playbook部署mysql服務(wù)器時出錯,原因是虛擬機內(nèi)存不夠
2.mysql_exporter節(jié)點起不來,需要創(chuàng)建授權(quán)用戶!此處使用的是root用戶,由于虛擬機環(huán)境不干凈存留以前的MySQL服務(wù),所以換一臺新的虛擬機實現(xiàn)成功
3.promethus配置文件問題,AlertManager默認(rèn)是關(guān)閉的,需要開啟并且需要自己添加rule文件到promethus配置文件中
4.AlertManager不需要安裝在所有的節(jié)點機器上面,可以單獨安裝也可以和Prometheus一起安裝文章來源:http://www.zghlxwxcb.cn/news/detail-759205.html
2.項目心得
1.提前規(guī)劃好整個集群的架構(gòu),可以提高項目開展時效率
2. 體會了自動化部署的重要性和容器化技術(shù)的好處,使組件部署和管理更加輕松
3. 明白了監(jiān)控與報警的關(guān)鍵性和重要性以及數(shù)據(jù)可視化的價值文章來源地址http://www.zghlxwxcb.cn/news/detail-759205.html
到了這里,關(guān)于項目04-基于Docker的Prometheus+Grafana+AlertManager的飛書監(jiān)控報警平臺的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!