ConsulManager/docs/FAQ.md

30 lines
1023 B
Markdown
Raw Normal View History

2022-04-20 16:56:35 +00:00
### 查后端实时日志先进入docker-compose.yml所在目录
```
docker-compose logs --tail=10 -f flask-consul
```
### 查前端实时日志先进入docker-compose.yml所在目录
```
docker-compose logs --tail=10 -f flask-vue
```
2022-06-16 03:26:35 +00:00
### 检查consul连接是否正常
2022-04-20 16:56:35 +00:00
```
2022-06-16 03:26:35 +00:00
# 进入容器:
docker-compose exec flask-consul sh
# 执行检查:
2022-04-20 16:56:35 +00:00
nc -vz {ip} 8500
```
2022-05-18 19:13:02 +00:00
### blackbox_exporter监控某个站点有异常如何debug
- 在blackbox检测该站点的链接末尾加上`&debug=true`,请求即可,例如:
```
http://10.0.0.26:9115/probe?module=http_2xx&target=https%3A%2F%2Fpayapp.weixin.qq.com&debug=true
```
- 在blackbox_exporter的启动命令增加参数`--log.level=debug`即可开启blackbox_exporter的debug日志systemd方式启动的日志追踪方式
```
journalctl -u blackbox_exporter.service -n20 -f
```
2022-06-16 03:15:36 +00:00
### prometheus配置告警规则后报错怎么办
- 进入prometheus所在的目录执行如下命令即可检查
```
./promtool check rules ./rules.yml
```