File tree Expand file tree Collapse file tree 5 files changed +21
-4
lines changed
Expand file tree Collapse file tree 5 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ services:
1919 restart : always
2020 ports :
2121 - " 8080:8080"
22+ - " 8081:8081" # actuator 포트
2223 environment :
2324 SPRING_PROFILES_ACTIVE : prod
2425 MYSQL_USERNAME : ${MYSQL_USERNAME}
Original file line number Diff line number Diff line change @@ -9,4 +9,5 @@ quartzVersion=2.5.0
99firebaseVersion =9.5.0
1010queryDslVersion =5.0.0
1111slackApiVersion =1.45.3
12- kotlinLoggingVersion =3.0.5
12+ kotlinLoggingVersion =3.0.5
13+ prometheusRegistryVersion =1.14.5
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ http {
1818 server api:8080 ;
1919 }
2020
21+ upstream tuk-monitoring {
22+ server api:8081 ;
23+ }
24+
2125 server {
2226 listen 80 ;
2327 server_name api.tuk.kr;
5761 }
5862
5963 location /actuator/health {
60- proxy_pass http ://tuk-api /actuator/health;
64+ proxy_pass http ://tuk-monitoring /actuator/health;
6165 proxy_set_header Host $host ;
6266 proxy_set_header X-Real-IP $remote_addr ;
6367 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ dependencies {
4646 // swagger
4747 implementation(" org.springdoc:springdoc-openapi-starter-webmvc-ui:${properties[" swaggerVersion" ]} " )
4848
49+ // prometheus
50+ implementation(" io.micrometer:micrometer-registry-prometheus:${properties[" prometheusRegistryVersion" ]} " )
51+
4952 // google oauth
5053 implementation(" com.google.api-client:google-api-client:${properties[" googleApiClientVersion" ]} " )
5154
@@ -61,7 +64,7 @@ dependencies {
6164
6265 // slack
6366 implementation(" com.slack.api:slack-api-client:${properties[" slackApiVersion" ]} " )
64-
67+
6568 // kotlin logging
6669 implementation(" io.github.microutils:kotlin-logging-jvm:${properties[" kotlinLoggingVersion" ]} " )
6770
Original file line number Diff line number Diff line change @@ -32,10 +32,12 @@ springdoc:
3232 use-fqn : true
3333
3434management :
35+ server :
36+ port : 8081
3537 endpoints :
3638 web :
3739 exposure :
38- include : health
40+ include : health, prometheus
3941
4042oauth :
4143 google :
@@ -97,6 +99,12 @@ slack:
9799 error-alert : C099EEB4SQ7
98100 enabled : true
99101
102+ management :
103+ endpoints :
104+ web :
105+ exposure :
106+ include : health, prometheus
107+
100108---
101109spring :
102110 jpa :
You can’t perform that action at this time.
0 commit comments