fix: migrate grafana subpath from /ui to /grafana
This commit is contained in:
parent
8111a400f2
commit
330c6df546
@ -101,7 +101,7 @@
|
||||
tags: dashboard_init
|
||||
ignore_errors: true
|
||||
vars:
|
||||
endpoint: "http://127.0.0.1:{{ grafana_port|default(3000) }}/ui"
|
||||
endpoint: "http://127.0.0.1:{{ grafana_port | default(3000) }}/grafana"
|
||||
username: "{{ grafana_admin_username|default('admin') }}"
|
||||
password: "{{ grafana_admin_password|default('pigsty') }}"
|
||||
shell: |
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
}
|
||||
|
||||
# -------------------------
|
||||
# Grafana: /ui/ 与 /ui/api/live/
|
||||
# Grafana: /grafana/ 与 /grafana/api/live/
|
||||
# -------------------------
|
||||
@ui path /ui/*
|
||||
@ui path /grafana/*
|
||||
handle @ui {
|
||||
reverse_proxy 127.0.0.1:3000 {
|
||||
header_up Host {host}
|
||||
@ -43,14 +43,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ui_live path /ui/api/live/*
|
||||
@ui_live path /grafana/api/live/*
|
||||
handle @ui_live {
|
||||
reverse_proxy 127.0.0.1:3000 {
|
||||
header_up Host {host}
|
||||
}
|
||||
}
|
||||
|
||||
@ui_rewrite path_regexp ui_rewrite ^/ui/(vmetrics|vlogs|vtraces|vmalert|haproxy|alertmgr)(.*)$
|
||||
@ui_rewrite path_regexp ui_rewrite ^/grafana/(vmetrics|vlogs|vtraces|vmalert|haproxy|alertmgr)(.*)$
|
||||
redir @ui_rewrite /{re.ui_rewrite.1}{re.ui_rewrite.2} 301
|
||||
|
||||
# -------------------------
|
||||
|
||||
@ -9,7 +9,7 @@ protocol = http
|
||||
http_addr = 0.0.0.0
|
||||
http_port = {{ grafana_port | default(3000) }}
|
||||
domain = {{ grafana_domain | default('localhost') }}
|
||||
root_url = %(protocol)s://%(domain)s:%(http_port)s/ui/
|
||||
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
|
||||
serve_from_sub_path = true
|
||||
|
||||
[database]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user