当我运行此命令时,它会创建 docker 容器,但显示为退出状态,我无法启动它
我的目标是能够用自定义 prometheus.yml 替换 prometheus.yml 文件,以监控在http://localhost:70/nginx_status运行的 nginx
docker run -it -d --name prometheus3 -p 9090:9090 -v
/opt/docker/prometheus:/etc/prometheus prom/prometheus -
config.file=/etc/prometheus/prometheus.yml
这是我的 prometheus.yml 文件
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
scrape_timeout: 5s
static_configs:
- targets: ['localhost: 9090']
- job_name: 'node'
static_configs:
- targets: ['localhost: 70/nginx_status']