Grafana v6.6.2 (3fa63cfc34)
- [log]
1
2
3# Either "console", "file", "syslog". Default is console and file
# Use space to separate multiple modes, e.g. "console file"
mode = console file - [paths]
1
2# Directory where grafana can store logs
logs = data/log [server]
1
2
3
4# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
data = data
# Log web requests
router_logging = falsedocker启动
1
2
3
4
5
6
7
8sudo docker run -d --name grafana-log \
-p 3000:3000 \
-e GF_LOG_MODE="console file" \
-e GF_PATHS_LOGS='/var/log/grafana' \
-e GF_SERVER_ROUTER_LOGGING=true \
-v /Users/blank/grafana:/var/lib/grafana \
-v /Users/blank/grafana/log:/var/log/grafana \
grafana如果错误提示:【Failed to start grafana. error: failed to initialize file handler: open /var/log/grafana/grafana.log: permission denied】请配置目录/Users/blank/grafana权限为777