默認的9090改為9999:
- 容器
docker run -d -p 9999:9090 \
-v $PWD/prometheus.yml:/etc/prometheus/prometheus.yml \
--name prometheus \
prom/prometheus \
- 二進制
安裝包解壓后直接啟動,加上參數 --web.listen-address中指定:./prometheus --web.listen-address=:9999
- 自啟動配置
[Unit]
Description=Prometheus
[Service]
ExecStart=/opt/prometheus --config.file=/opt/prometheus.yml --web.listen-address=:9999
[Install]
WantedBy=multi-user.target