常用配置片段
常用配置片段
[server]
http_port = 3000
root_url = https://grafana.example.com/
[users]
allow_sign_up = false
[security]
secret_key = <32 位以上随机串>
[auth.anonymous]
enabled = false环境变量覆盖规则:GF_ + 节名 + 键名并使用大写,例如 GF_SERVER_HTTP_PORT=3000。
配置文件按节组织:server 管监听与外部地址,database 管控库,security 管密钥,users 与 auth.anonymous 管控用户接入;环境变量可逐项覆盖。
[server]
http_port = 3000
root_url = https://grafana.example.com/
[users]
allow_sign_up = false
[security]
secret_key = <32 位以上随机串>
[auth.anonymous]
enabled = false