简体   繁体   中英

How to add path field to every document in an ElasticSearch index?

While pushing logs from local to ES using file input plugin, a path field gets added which contains the actual path of the log file which the document was created from. But this field doesn't show up when using the AWS s3 input plugin. How do I add it?

My s3 input plugin:

s3 {
      "access_key_id" => "***"
      "secret_access_key" => "***"
      "backup_to_dir" => "/home/xyz/aws_s3_backup_data/"
      "bucket" => "bucket"
      "prefix" => "folder/dir/"
   }

看起来他们将其添加为[@metadata][s3][key] ,尽管它不在文档中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM