docker运行prometheus

pull镜像

docker pull prom/prometheus:latest

运行

docker run -p 9090:9090 \
-v /tmp/prometheus-data:/prometheus-data \
prom/prometheus

如果要映射配置文件

docker run -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml \
       -v /tmp/prometheus-data:/prometheus-data \
       prom/prometheus

访问

http://192.168.99.100:9090/graph
docker运行prometheus_第1张图片

计算实例,指标可以从http://192.168.99.100:9090/me...中找

prometheus_target_interval_length_seconds{quantile="0.99"}

或者

count(prometheus_target_interval_length_seconds)

docker运行prometheus_第2张图片

查看图形
docker运行prometheus_第3张图片

doc

  • prometheus-install

  • prometheus expression language documentation

你可能感兴趣的:(Prometheus,docker,容器)