File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/main/java/kdt/web_ide/common/config Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ http {
3131 keepalive 1024 ;
3232 }
3333
34+ upstream node_exporter {
35+ server 127.0.0.1:9100 ;
36+ keepalive 1024 ;
37+ }
38+
3439 server {
3540 listen 80 default_server;
3641 listen [::]:80 default_server;
@@ -50,6 +55,16 @@ http {
5055 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
5156 }
5257
58+ location /metrics {
59+ proxy_pass http ://node_exporter;
60+ proxy_http_version 1.1;
61+ proxy_set_header Connection $connection_upgrade ;
62+ proxy_set_header Upgrade $http_upgrade ;
63+ proxy_set_header Host $host ;
64+ proxy_set_header X-Real-IP $remote_addr ;
65+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
66+ }
67+
5368 access_log /var/log/nginx/access.log main;
5469
5570 client_header_timeout 60 ;
Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
5959 "/api/auth/login" ,
6060 "/api/auth/testjoin" ,
6161 "api/auth/testlogin" ,
62- "/actuator/**" )
62+ "/actuator/**" ,
63+ "/metrics/**" )
6364 .permitAll ()
6465 .requestMatchers ("/api/auth/**" , "/chatting/**" , "/api/chat/room" )
6566 .permitAll ()
You can’t perform that action at this time.
0 commit comments