File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,5 +41,34 @@ server {
4141 set $upstream_port 8080;
4242 set $upstream_proto http;
4343 proxy_pass $upstream_proto://$upstream_app:$upstream_port;
44+
45+ }
46+
47+ location ~ (/cadvisor)?/api {
48+ include /config/nginx/proxy.conf;
49+ include /config/nginx/resolver.conf;
50+ set $upstream_app cadvisor;
51+ set $upstream_port 8080;
52+ set $upstream_proto http;
53+ proxy_pass $upstream_proto://$upstream_app:$upstream_port;
54+
55+ }
56+
57+ location ~ (/cadvisor)?/metrics {
58+ # enable the next two lines for http auth
59+ #auth_basic "Restricted";
60+ #auth_basic_user_file /config/nginx/.htpasswd;
61+
62+ # block metrics access by default because it is unprotected
63+ # you can comment out the next line to enable remote metrics
64+ deny all;
65+
66+ include /config/nginx/proxy.conf;
67+ include /config/nginx/resolver.conf;
68+ set $upstream_app cadvisor;
69+ set $upstream_port 8080;
70+ set $upstream_proto http;
71+ proxy_pass $upstream_proto://$upstream_app:$upstream_port;
72+
4473 }
4574}
You can’t perform that action at this time.
0 commit comments