Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I force rebuild log's data in filebeat 5

I have filebeats 5.x ship logs to logstash.

How do I reset the “file pointer” in filebeat

This is a similar problem to

  • How to force Logstash to reparse a file?
  • https://discuss.elastic.co/t/how-do-i-reset-the-file-pointer-in-filebeats/49440

I cleaned all elasticsearch's data, delete the /var/lib/filebeat/registry. but filebeat is only shipping the new line.

change the registry_file is invalid, the file's offset saved to new file (delete file is the same problem) filebeat.registry_file: registry

like image 456
周宏成 Avatar asked Jan 17 '17 17:01

周宏成


People also ask

How do I know if Elasticsearch is receiving data from Filebeat?

You can check if data is contained in a filebeat-YYYY. MM. dd index in Elasticsearch using a curl command that will print the event count. And you can check the Filebeat logs for errors if you have no events in Elasticsearch.

What does Filebeat watch for ?_?

Filebeat is a lightweight shipper for forwarding and centralizing log data. Installed as an agent on your servers, Filebeat monitors the log files or locations that you specify, collects log events, and forwards them either to Elasticsearch or Logstash for indexing.


1 Answers

  1. Stop filbeat service.
  2. Rename the register file - usually found in /var/lib/filebeat/registry
  3. Start filbeat service.

sudo service filbeat stop

mv /var/lib/filebeat/registry /var/lib/filebeat/registry.old

sudo service filbeat start

like image 86
Yasir Avatar answered Sep 28 '22 12:09

Yasir