- job_name: 'swarm_task_exporter' scrape_interval: 15s dockerswarm_sd_configs: - host: unix:///var/run/docker.sock role: tasks filters: - name: "desired-state" values: ["running"] - name: "service" values: [ "redis_redis_exporter" ] relabel_configs: # Remove port from "__address...
scrape_interval: 30s evaluation_interval: 30s labels: cluster: swarm replica: "1" scrape_configs: - job_name: 'cadvisor' dns_sd_configs: - names: - 'tasks.cadvisor' type: 'A' port: 8080 - job_name: 'node-exporter' dns_sd_configs: - names: - 'tasks.node-exporter' type: 'A' por...
scrape_configs: - job_name: 'dockerswarm' dockerswarm_sd_configs: - host: unix:///var/run/docker.sock role: tasks relabel_configs: # Only keep containers that should be running. - source_labels: [__meta_dockerswarm_task_desired_state] regex: running action: keep # Only keep containers...
对node-exporter、cadvisor采用dns服务发现形式 对于系统应用采用file_sd_configs,通过conf/service.yaml中配置,来是prometheus对我们提供的服务进行监控 因为Prometheus没有专门针对swarm的服务发现组件,需要手动向file_sd_configs对应的文件中追加,Prometheus官方上有一个方案,具体可参考prometheus-swarm-discovery 启动prometheu...
scrape_configs:-job_name:'swarm-service'scrape_interval:30sdns_sd_configs:-names:-tasks.mock-standalone-mocktype:Aport:8080relabel_configs:-source_labels:['__meta_dns_name']target_label:'service' 注意到上面的两个关键配置: 设定了两个DNS A记录,tasks.mock和standalone-mock。
Compose 项⽬是 Docker 官⽅的开源项⽬,负责实现对 Docker 容器集群的快速编排。从功能上看,跟 OpenStack 中的 Heat ⼗分类似。 其代码⽬前在 https://github.com/docker/compose 上开源。 Compose 定位是 「定义和运⾏多个 Docker 容器的应⽤(Defining and running multi-container Docker application...
[root@docker ~]# docker config --help Usage: docker config COMMAND Manage Docker configs Commands: create Create a config from a file or STDIN inspect Display detailed information on one or more configs ls List configs rm Remove one or more configs Run 'docker config COMMAND --help' for ...
dockerswarm_sd_configs: - host: unix:///var/run/docker.sock role: nodes relabel_configs: # Fetch metrics on port 9323. - source_labels: [__meta_dockerswarm_node_address] target_label: __address__ replacement: $1:9323 # Set hostname as instance label ...
scrape_configs:...- job_name:'swarm-service'dns_sd_configs:-names:-'tasks.sample-service'type:'A'port:8080metrics_path:'/actuator/prometheus' After building the image I create theswarm-prometheusservice docker build-tswarm-prometheus.docker service create\--replicas1\--nameswarm-prometheus\--...
scrape_configs: - job_name: 'cadvisor' dns_sd_configs: - names: - 'tasks.cadvisor' type: 'A' port: 8080 - job_name: 'node-exporter' dns_sd_configs: - names: - 'tasks.node-exporter' type: 'A' port: 9100 Based on Docker Host & Container Overviewby by uschtwillhttps://grafana....