Why doesn’t change file name of source in ~/data/registry/filebeat/data.json?

Hello. There are a few questions about filebeat 7.6.0.

While writing the filebeat, the file bit pattern is used as shown below.

-/seungdols/logs/node/server/server.log
-/seungdols/logs/node/server/server.log.*

And while I was working on renaming the log files, I got a question.

If it is set as above, and previously set the log file in the format of server.log.yyyyMMdd, use server.log and limit the capacity. If it exceeds 100MB, server.log.1|2|3|4|5 rotate the log file.(using log4js-node)

If you check /seungdols/apps/filebeat/data/registry/filebeat/data.json to check if the filebeat is operating normally, the files except the server.log.1 file appear in the source, and server.log.1 The file does not appear in data.json.

{
  "source": "/seungdols/logs/node/server/server.log.3",
  "offset": 100000143,
  "timestamp": "2020-06-29T17:45:35.446786333+09:00",
  "ttl": -1,
  "type": "log",
  "meta": null,
  "FileStateOS": {
    "inode": 2148631080,
    "device": 2053
  }
}, {
  "source": "/seungdols/logs/node/server/server.log.2",
  "offset": 100000008,
  "timestamp": "2020-06-29T17:46:25.727110866+09:00",
  "ttl": -1,
  "type": "log",
  "meta": null,
  "FileStateOS": {
    "inode": 2148631081,
    "device": 2053
  }
}, {
  "source": "/seungdols/logs/node/server/server.log",
  "offset": 100000114,
  "timestamp": "2020-06-29T17:45:30.72386358+09:00",
  "ttl": -1,
  "type": "log",
  "meta": null,
  "FileStateOS": {
    "inode": 2148631082,
    "device": 2053
  }
}, {
  "source": "/seungdols/logs/node/server/server.log",
  "offset": 82133478,
  "timestamp": "2020-06-29T17:49:03.856735277+09:00",
  "ttl": -1,
  "type": "log",
  "meta": null,
  "FileStateOS": {
    "inode": 2148631083,
    "device": 2053
  }
}, {
  "source": "/seungdols/logs/node/server/server.log.5",
  "offset": 100000096,
  "timestamp": "2020-06-29T17:45:35.446786333+09:00",
  "ttl": -1,
  "type": "log",
  "meta": null,
  "FileStateOS": {
    "inode": 2148631084,
    "device": 2053
  }
},
{
  "source": "/seungdols/logs/node/server/server.log.4",
  "offset": 100000180,
  "timestamp": "2020-06-29T17:45:35.446786333+09:00",
  "ttl": -1,
  "type": "log",
  "meta": null,
  "FileStateOS": {
    "inode": 2148631085,
    "device": 2053
  }
}

What is the reason?

Why is the server.log file showing the same path twice?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.