Filebeat 日志不输出

本文详细介绍了在Linux系统上使用systemd时,如何修改Filebeat的日志输出设置。默认情况下,Filebeat会将日志输出到journald,但可以通过编辑配置文件并设置特定的环境变量来更改这一行为。
摘要由CSDN通过智能技术生成

Config logging

[WARNING] When Filebeat is running on a Linux system with systemd, it uses by default the -e command line option, that makes it write all the logging output to stderr so it can be captured by journald. Other outputs are disabled.

Filebeat and systemd and Customize systemd unit for Filebeat

To change the logging output from the Filebeat configuration file, empty the environment variable.

[Service]
Environment="BEAT_LOG_OPTS="

then

systemctl daemon-reload
systemctl restart filebeat

I first use systemctl edit filebeat.service to edit, but it not works.

$ ls /etc/systemd/system/filebeat.service.d/
override.conf

I just rename the override.conf to debug.conf with mv override.conf debug.conf, then reload and restart, it works.

$ tail -f /var/log/filebeat/filebeat
2019-08-23T18:22:02.620+0800    INFO    [monitoring]    log/log.go:145  Non-zero metrics in the last 30s
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值