File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM prom/prometheus:latest
22
3+ COPY prometheus.yml /etc/prometheus/prometheus.yml
4+
35EXPOSE 9090
46
5- CMD [ "--config.file=/etc/prometheus/prometheus.yml" ]
7+ HEALTHCHECK --interval=15s --timeout=3s --start-period=10s --retries=3 \
8+ CMD ["curl" , "-f" , "http://localhost:9090/-/healthy" ]
Original file line number Diff line number Diff line change 1+ global :
2+ scrape_interval : 15s
3+
14scrape_configs :
2- - job_name : prometheus
3- metrics_path : /metrics
4- scheme : http
5+ - job_name : ' spring-boot-app'
6+ metrics_path : ' /actuator/prometheus'
57 static_configs :
6- - targets :
7- - localhost:9090
8-
9- - job_name : spring-actuator
10- metrics_path : /actuator/prometheus
11- scheme : http
12- scrape_interval : 15s
13- ec2_sd_configs :
14- - region : ap-northeast-2
15- port : 80
16- filters :
17- - name : tag:Monitoring
18- values :
19- - enabled
20- relabel_configs :
21- - source_labels : [__meta_ec2_tag_Name]
22- target_label : instance
23- - source_labels : [__meta_ec2_private_ip]
24- regex : (.*)
25- replacement : ${1}:10090
26- action : replace
27- target_label : __address__
28- - source_labels : [__meta_ec2_tag_group]
29- target_label : group
30- - source_labels : [__meta_ec2_instance_type]
31- target_label : instance_type
8+ - targets : ['localhost:8080']
You can’t perform that action at this time.
0 commit comments