Remove blank lines after code block markers

This commit is contained in:
yeasy
2026-03-21 22:36:09 -07:00
parent 370949f226
commit 44b1307277
132 changed files with 0 additions and 1517 deletions
-7
View File
@@ -48,7 +48,6 @@ scrape_configs:
rule_files:
- /etc/prometheus/rules.yml
```
#### 2. 编写 Docker Compose 文件
创建 `compose.yaml` ( `docker-compose.yml`)
@@ -106,13 +105,11 @@ networks:
volumes:
prometheus_data:
```
#### 3. 启动服务
```bash
$ docker compose up -d
```
启动后访问以下地址
* Prometheus: `http://localhost:9090`
@@ -208,7 +205,6 @@ groups:
summary: "磁盘可用空间不足"
description: "Instance={{ $labels.instance }}, Mountpoint={{ $labels.mountpoint }}"
```
说明这里的规则是可用空间低于 10%的阈值告警并非未来 24 小时写满的预测生产环境建议针对特定文件系统与挂载点做更精确的过滤
##### 2. 配置 Prometheus 加载规则并接入 Alertmanager
@@ -224,7 +220,6 @@ alerting:
- static_configs:
- targets: ["alertmanager:9093"]
```
并在 Compose 中挂载规则文件
##### 3. 部署 Alertmanager
@@ -240,7 +235,6 @@ receivers:
webhook_configs:
- url: http://example.com/webhook
```
再在 `compose.yaml` 增加服务
```yaml
@@ -253,7 +247,6 @@ receivers:
networks:
- monitoring
```
生产环境中建议将告警发送到可追踪的渠道 ( IM 机器人事件平台工单系统)并在告警中附带 Dashboard 链接与排障入口避免告警成为噪声
#### 建议的文件清单