path => [ "/opt/soft/logstash_log/log/robot_talk.log", "/opt/soft/logstash_log/log/robot_talk.%{+yyyy-MM-dd}.log" ]
如上配置。只能监控到robot_talk.log 这个日志的变化。
问题是:robot_talk.2018-08-09.log这个日志文件无法监控。是哪里写错了呢,请指教,谢谢。
如上配置。只能监控到robot_talk.log 这个日志的变化。
问题是:robot_talk.2018-08-09.log这个日志文件无法监控。是哪里写错了呢,请指教,谢谢。
4 个回复
zqc0512 - andy zhou
赞同来自: qw8613243
change to
path => [ "/opt/soft/logstash_log/log/robot_talk.log", "/opt/soft/logstash_log/log/robot_talk.%{+yyyy-MM-dd}.log" ]
and try
or
path => [ "/opt/soft/logstash_log/log/robot_talk.log", "/opt/soft/logstash_log/log/*" ]
zqc0512 - andy zhou
赞同来自: qw8613243
试试 path => [ "/opt/soft/logstash_log/log/robot_talk.log", "/opt/soft/logstash_log/log//robot_talk.*.log" ]
可以排除的,不行你把不需要的排除掉
https://www.elastic.co/guide/e ... clude
heyddo
赞同来自: qw8613243
qw8613243
赞同来自:
这个方法我试过了,还是监控不了。可能是我贴问题的时候贴错了,贴成了这样:%{+yyyy-MM-dd}.log}
用这种方式,达不到我的目的,我想带上前缀
path => [ "/opt/soft/logstash_log/log/robot_talk.log", "/opt/soft/logstash_log/log/*" ]