mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 04:14:38 +00:00
Fix missing links
This commit is contained in:
@@ -15,7 +15,7 @@ ELK (Elasticsearch,Logstash,Kibana) 是目前业界最流行的开源日志
|
||||
|
||||
我们将使用 Docker Compose 来一键部署整个日志堆栈。
|
||||
|
||||
#### 1。编写 Compose 文件
|
||||
#### 1. 编写 Compose 文件
|
||||
|
||||
1. 编写 `compose.yaml` (或 `docker-compose.yml`) 配置如下:
|
||||
|
||||
@@ -71,7 +71,7 @@ networks:
|
||||
logging:
|
||||
```
|
||||
|
||||
#### 2。配置 Fluentd
|
||||
#### 2. 配置 Fluentd
|
||||
|
||||
创建 `fluentd/conf/fluent.conf`:
|
||||
|
||||
@@ -102,7 +102,7 @@ networks:
|
||||
</match>
|
||||
```
|
||||
|
||||
#### 3。配置应用容器使用 fluentd 驱动
|
||||
#### 3. 配置应用容器使用 fluentd 驱动
|
||||
|
||||
启动一个测试容器,指定日志驱动为 `fluentd`:
|
||||
|
||||
@@ -117,7 +117,7 @@ docker run -d \
|
||||
|
||||
**注意**:确保 `fluentd` 容器已经启动并监听在 `localhost:24224`。在生产环境中,如果你是在不同机器上,需要将 `localhost` 替换为运行 fluentd 的主机 IP。
|
||||
|
||||
#### 4。在 Kibana 中查看日志
|
||||
#### 4. 在 Kibana 中查看日志
|
||||
|
||||
1. 访问 `http://localhost:5601`。
|
||||
2. 进入 **Management**->**Kibana**->**Index Patterns**。
|
||||
|
||||
@@ -17,7 +17,7 @@ Prometheus 的主要组件包括:
|
||||
|
||||
我们可以使用 Docker Compose 快速部署一套 Prometheus + Grafana 监控环境。
|
||||
|
||||
#### 1。准备配置文件
|
||||
#### 1. 准备配置文件
|
||||
|
||||
创建 `prometheus.yml`:
|
||||
|
||||
@@ -39,7 +39,7 @@ scrape_configs:
|
||||
- targets: ['cadvisor:8080']
|
||||
```
|
||||
|
||||
#### 2。编写 Docker Compose 文件
|
||||
#### 2. 编写 Docker Compose 文件
|
||||
|
||||
创建 `compose.yaml` (或 `docker-compose.yml`):
|
||||
|
||||
@@ -88,7 +88,7 @@ networks:
|
||||
monitoring:
|
||||
```
|
||||
|
||||
#### 3。启动服务
|
||||
#### 3. 启动服务
|
||||
|
||||
运行以下命令:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user