1、创建prometheus【prometheus.yml】配置
global: scrape_interval: 15s evaluation_interval: 15s scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['192.168.2.216:9090']View Code
2、创建【docker-compose.yml】
version: '3' services: prometheus: image: prom/prometheus container_name: prometheus ports: - "9090:9090" volumes: - ./config/prometheus.yml:/etc/prometheus/prometheus.yml - ./data:/prometheusView Code
3、启动prometheus
docker-compose up -d
4、访问服务
http://192.168.2.216:9090/graph
5、需要检测的服务器部署检测端
标签:compose,9090,grafana,prometheus,服务器,docker,yml From: https://www.cnblogs.com/raorao1994/p/18072164