I just wonder that filebeat recognizes the file which be re-named by new one although it is already scanned.
it is filebeat config
input_type: log
# Paths that should be crawled and fetched. Glob based paths.
# To fetch all ".log" files from a specific level of subdirectories
# /var/log/*/*.log can be used.
# For each file found under this path, a harvester is started.
# Make sure not file is defined twice as this can lead to unexpected behaviour.
paths:
- /opt/tomcat/logs/localhost_access_log.*.txt
encoding: utf-8
fields:
module: "ACCESS"
fields_under_root: true
scan_frequency: 1s
16-11-15T01:47:26Z INFO Registry file updated. 204 states written.
2016-11-15T01:47:27Z INFO Run prospector
2016-11-15T01:47:27Z INFO Run prospector
2016-11-15T01:47:27Z INFO Run prospector
I already try to do that, I don't find the log which i want to send.
Also, filebeat maybe send today's log but not previous log about filebeat log which share before.
Give a detailed,
I restart elastic serach for scaleup server in November. After restarting, elasticsearch don't show the log before restaring. Maybe delete all index of elasticsearch for some reason.
So I changed the name of log which made in October and restart filebeat in order to it is recognized as new files .
But I just see the log on kibana after restart elasticsearch. I don't see the log in October.
Renaming a file does not update the modification time. Also if the file is in the filebeat registry, it will not be fetched again. If you want to resend all data you must remove the registry file.
How can you tell filebeat did not send anything in the past? Did you check number of events and timestamps in kafka? Any old filebeat logs?
Before deleting the registry, can you share a copy? The registry contains collected filenames and offsets?
Every component in your chain is quite complex in itself, let's look at each one after another before applying changes to all services at the same time.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.