在Filebeat中设置时间戳的时区有以下几种方法:
timezone
选项来设置时区,如:filebeat.inputs:
- type: log
paths:
- /var/log/*.log
fields_under_root: true
fields:
log_type: syslog
timezone: UTC
TZ
环境变量,如:TZ=UTC filebeat -e
-E
选项来设置时区,如:filebeat -e -E TZ=UTC
processors
选项来修改时间戳的时区,如:filebeat.inputs:
- type: log
paths:
- /var/log/*.log
processors:
- timestamp:
field: @timestamp
timezone: UTC
以上是一些常见的设置Filebeat时间戳时区的方法,可以根据实际情况选择合适的方法进行设置。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
相关推荐:Filebeat中时间戳的设置方法有哪些