5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Filebeatでログファイルを最初から読み込ませる(転送完了位置の記録をリセット)

Last updated at Posted at 2019-10-17

概要

Filebeatはログファイルの転送完了位置をRegistry Fileに保存している。
すでに転送したログファイルを最初から読み込ませたいなら、Registry Fileを削除すれば良い。

Directory layout(インストール方法によって異なる)
https://www.elastic.co/guide/en/beats/filebeat/current/directory-layout.html

コマンド

# rpmでインストールした場合
rm -rf /var/lib/filebeat/registry

参考:Registry Fileの内容

registry/filebeat/data.json
[{"source":"/tmp/logstash-tutorial.log","offset":24464,"timestamp":"2019-10-17T13:27:30.836707149+08:00","ttl":-1,"type":"log","meta":null,"FileStateOS":{"inode":1179665,"device":64769}}]
registry/filebeat/meta.json
{"version": "0"}
5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?