File tree Expand file tree Collapse file tree 4 files changed +70
-3
lines changed
Expand file tree Collapse file tree 4 files changed +70
-3
lines changed Original file line number Diff line number Diff line change @@ -59,4 +59,33 @@ services:
5959 - " 4316:4318" # OTLP HTTP
6060 depends_on :
6161 elastic :
62- condition : service_healthy
62+ condition : service_healthy
63+
64+ prometheus :
65+ image : prom/prometheus:v3.7.1
66+ container_name : library-prometheus
67+ command :
68+ - ' --config.file=/etc/prometheus/prometheus.yml'
69+ - ' --storage.tsdb.path=/prometheus'
70+ - ' --web.console.libraries=/etc/prometheus/console_libraries'
71+ - ' --web.console.templates=/etc/prometheus/consoles'
72+ volumes :
73+ - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
74+ ports :
75+ - " 9090:9090"
76+ extra_hosts :
77+ - " host.docker.internal:host-gateway"
78+
79+ grafana :
80+ image : grafana/grafana:12.2.1
81+ container_name : library-grafana
82+ environment :
83+ - GF_SECURITY_ADMIN_USER=admin
84+ - GF_SECURITY_ADMIN_PASSWORD=xpinjection
85+ - GF_USERS_ALLOW_SIGN_UP=false
86+ volumes :
87+ - ./grafana/datasources:/etc/grafana/provisioning/datasources:ro
88+ ports :
89+ - " 3000:3000"
90+ depends_on :
91+ - prometheus
Original file line number Diff line number Diff line change 1+ apiVersion : 1
2+
3+ datasources :
4+ - name : Prometheus
5+ type : prometheus
6+ access : proxy
7+ url : http://prometheus:9090
8+ isDefault : true
9+ editable : true
10+ jsonData :
11+ timeInterval : 5s
12+ queryTimeout : 60s
Original file line number Diff line number Diff line change 1+ global :
2+ scrape_interval : 15s
3+ evaluation_interval : 15s
4+ external_labels :
5+ monitor : ' library-monitor'
6+
7+ scrape_configs :
8+ - job_name : ' library-application'
9+ metrics_path : ' /admin/prometheus'
10+ scrape_interval : 5s
11+ basic_auth :
12+ username : admin
13+ password : xpinjection
14+ static_configs :
15+ - targets : ['host.docker.internal:8080']
16+ labels :
17+ application : ' library'
18+ environment : ' local-dev'
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ spring:
1111 enabled : true
1212
1313management :
14+ prometheus :
15+ metrics :
16+ export :
17+ enabled : true
1418 observations :
1519 annotations :
1620 enabled : true
@@ -61,7 +65,11 @@ management:
6165 enabled : true
6266 process :
6367 enabled : true
64- metrics :
6568 distribution :
6669 percentiles-histogram :
67- http.server.requests : true
70+ http.server.requests : true
71+
72+ server :
73+ tomcat :
74+ mbeanregistry :
75+ enabled : true
You can’t perform that action at this time.
0 commit comments