Add/adjust api and metric endpoints

This commit is contained in:
Eric Nemchik 2023-02-12 13:08:49 -06:00
parent 1228f6edfd
commit a3ba31a80a
10 changed files with 167 additions and 32 deletions

View file

@ -1,4 +1,4 @@
## Version 2023/02/05
## Version 2023/02/12
# make sure that your grafana container is named grafana
# make sure that grafana is set to work with the base url /grafana/
# grafana requires environment variables set thus:
@ -33,3 +33,37 @@ location ^~ /grafana/ {
rewrite ^/grafana/(.*)$ /$1 break;
}
location ^~ /grafana/api {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_grafana grafana;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass http://$upstream_grafana:$upstream_port ;
# Clear Authorization Header if you are using http auth and normal Grafana auth
#proxy_set_header Authorization "";
rewrite ^/grafana/(.*)$ /$1 break;
}
location ^~ /grafana/metrics {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_grafana grafana;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass http://$upstream_grafana:$upstream_port ;
# Clear Authorization Header if you are using http auth and normal Grafana auth
#proxy_set_header Authorization "";
rewrite ^/grafana/(.*)$ /$1 break;
}