diff --git a/config/prometheus.yml b/config/prometheus.yml new file mode 100644 index 0000000..3b02fba --- /dev/null +++ b/config/prometheus.yml @@ -0,0 +1,21 @@ +global: + scrape_interval: 15s + +scrape_configs: + - job_name: 'api-server' + metrics_path: '/actuator/prometheus' + static_configs: + - targets: ['127.0.0.1:8080'] + + - job_name: 'bank' + metrics_path: '/actuator/prometheus' + static_configs: + - targets: ['127.0.0.1:8081'] + + - job_name: 'prometheus' + static_configs: + - targets: ['localhost:9090'] + + - job_name: 'jmeter' + static_configs: + - targets: ['127.0.0.1:9270'] # JMeter 플러그인을 통한 데이터 수집 \ No newline at end of file diff --git a/src/main/java/com/daon/onjung/core/constant/Constants.java b/src/main/java/com/daon/onjung/core/constant/Constants.java index b4240fd..5c88e9a 100644 --- a/src/main/java/com/daon/onjung/core/constant/Constants.java +++ b/src/main/java/com/daon/onjung/core/constant/Constants.java @@ -39,7 +39,11 @@ public class Constants { "/api-docs.html", "/api-docs/**", "/swagger-ui/**", - "/v3/**" + "/v3/**", + + // prometheus + "/actuator/", + "/actuator/**" ); /**