我已根据此链接安装了开箱即用的监控功能:
http://www.jhipster.tech/monitoring/
当我开始时:
docker-compose up -d
一切都开始但不是Elastalert:
First log:
错误:for monitoring_jhipster-alerter_1无法启动服务jhipster-alerter:OCI运行时创建失败:container_linux.go:296:启动容器进程导致" process_linux.go:398:容器初始化导致\" rootfs_linux .go:58:mount \\" /Users/john/source/intellij/company/app/myservice/alerts/config.yaml \\" to rootfs \\" / var / lib / docker / overlay2 / 5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5 / merged \\" at \\" /var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged/opt/elastalert/config.yaml \\"导致\\"不是目录\\" \"":未知:您是否正在尝试安装direStarting monitoring_jhipster-import-dashboards_1
Second log:
错误:对于jhipster-alerter无法启动服务jhipster-alerter:OCI运行时创建失败:container_linux.go:296:启动容器进程导致" process_linux.go:398:容器init导致\" rootfs_linux .go:58:mount \\" /Users/john/source/intellij/company/app/myservice/alerts/config.yaml \\" to rootfs \\" / var / lib / docker / overlay2 / 5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5 / merged \\" at \\" /var/lib/docker/overlay2/5657c6e9e7bb2be5cf4fa9860c04269e34be15641f4e3f0c1449af7cbf82ced5/merged/opt/elastalert/config.yaml \\"导致\\"不是目录\\" \"":未知:您是否尝试将目录挂载到文件上(反之亦然)?检查指定的主机路径是否存在且是否为预期类型 错误:在启动项目时遇到错误。
使用我使用的默认docker-compose.yml文件:
curl -O https://raw.githubusercontent.com/jhipster/jhipster-console/master/bootstrap/docker-compose.yml
我不确定这些消息是什么意思?
答案 0 :(得分:0)
这是因为JHipster Alerter的卷路径不正确。更改
jhipster-alerter:
image: jhipster/jhipster-alerter:latest
environment:
- ES_HOST=jhipster-elasticsearch
- ES_PORT=9200
volumes:
- ../jhipster-alerter/rules/:/opt/elastalert/rules/
- ../alerts/config.yaml:/opt/elastalert/config.yaml
收件人
- ../alerts/rules/:/opt/elastalert/rules/
- ../jhipster-alerter/config.yaml:/opt/elastalert/config.yaml