Graylog的日志文件存放在Graylog服務器的日志目錄中,默認情況下,這個目錄是/var/log/graylog/
。
在Graylog的配置文件/etc/graylog/server/server.conf
中,可以配置Graylog的日志文件路徑。在配置文件中找到以下參數:
# REST API listening URI. This must be reachable by other Graylog servers if you run a cluster.
rest_listen_uri = http://127.0.0.1:9000/api/
# Web interface URI. This must be reachable by your browser.
web_listen_uri = http://127.0.0.1:9000/
# REST API transport address. This must be a non-loopback address. If not set, it will be picked up from the request's host header.
#rest_transport_uri = http://192.168.1.1:9000/api/
# Enable gzip support for REST API
rest_enable_gzip = false
# 打開日志文件設置
# 日志文件
log_file = /var/log/graylog/server.log
# 日志級別
log_level = info
# 日志顏色開啟
is_color_enabled = true
在這里可以修改log_file = /var/log/graylog/server.log
的路徑來配置Graylog的日志文件路徑。修改完配置文件后,需要重啟Graylog服務才能生效。