|
1 |
| -## Version 2023/02/05 |
| 1 | +## Version 2023/02/12 |
2 | 2 | # make sure that your prometheus container is named prometheus
|
3 | 3 | # make sure that your dns has a cname set for prometheus
|
4 | 4 |
|
@@ -43,4 +43,42 @@ server {
|
43 | 43 | proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
44 | 44 |
|
45 | 45 | }
|
| 46 | + |
| 47 | + location ~ (/prometheus)?/api { |
| 48 | + include /config/nginx/proxy.conf; |
| 49 | + include /config/nginx/resolver.conf; |
| 50 | + set $upstream_app prometheus; |
| 51 | + set $upstream_port 9090; |
| 52 | + set $upstream_proto http; |
| 53 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 54 | + |
| 55 | + } |
| 56 | + |
| 57 | + location ~ (/prometheus)?/-/(healthy|ready|reload|quit) { |
| 58 | + # enable the next two lines for http auth |
| 59 | + #auth_basic "Restricted"; |
| 60 | + #auth_basic_user_file /config/nginx/.htpasswd; |
| 61 | + |
| 62 | + include /config/nginx/proxy.conf; |
| 63 | + include /config/nginx/resolver.conf; |
| 64 | + set $upstream_app prometheus; |
| 65 | + set $upstream_port 9090; |
| 66 | + set $upstream_proto http; |
| 67 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 68 | + |
| 69 | + } |
| 70 | + |
| 71 | + location ~ (/prometheus)?/metrics { |
| 72 | + # enable the next two lines for http auth |
| 73 | + #auth_basic "Restricted"; |
| 74 | + #auth_basic_user_file /config/nginx/.htpasswd; |
| 75 | + |
| 76 | + include /config/nginx/proxy.conf; |
| 77 | + include /config/nginx/resolver.conf; |
| 78 | + set $upstream_app prometheus; |
| 79 | + set $upstream_port 9090; |
| 80 | + set $upstream_proto http; |
| 81 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 82 | + |
| 83 | + } |
46 | 84 | }
|
0 commit comments