实验目的 🔗
-
创建 easeprobe ping probe 配置并运行
-
探测
127.0.0.1
docker-compose 配置 🔗
version: "3.9"
services:
probe:
image: megaease/easeprobe:v2.0.1
container_name: probe
volumes:
- type: bind
source: ./config.yaml
target: /opt/config.yaml
read_only: true
network_mode: host
easeprobe 配置 config.yaml
🔗
ping:
- name: local
host: 127.0.0.1
count: 5
lost: 0.2
privileged: true
notify:
log:
- name: notify log file # local log file
file: /var/log/notify.log
log:
file: /var/log/probe.log
level: "debug"
环境 🔗
验证 🔗
- 查看日志
- 查看 8181 端口
视频 🔗
问题 🔗
docker-compose.yaml
中 network_mode: host
时,
config.yaml
只有设置 privileged: true
时才能正常工件
如果 docker-compose.yaml
中没有 network_mode: host
config.yaml
配置同官网描述一致。