将CSV数据上传到使用fluentd的弹性搜索中

问题描述 投票:0回答:1

我正在使用flunetd。我有一个看起来像这样的csv文件。

enter image description here

我想使用Elastic Search将此CSV文件上传到Fluentd数据库。这是我使用的流利的配置文件。

<source>
  @type tail
  path /home/paulsteven/Datasets/SalesRecords.csv #...or where you placed your Apache access log
  pos_file /var/log/td-agent/httpd-access.log.pos # This is where you record file position
  tag salesRecords #fluentd tag!
  format csv
  keys Region, Country, Item Type, Sales Channel, Order Priority, Order Date, Order ID, Ship Date, Units Sold # e.g., user_id, timestamp, action
  time_key Ship Date # Specify the column that you want to use as timestamp
</source>

<match **>
  @type elasticsearch
  logstash_format true
  host "localhost" #(optional; default="localhost")
  port 9200 #(optional; default=9200)
  index_name fluent_index #(optional; default=fluentd)
  type_name fluentd_type #(optional; default=fluentd)
</match>

在终端中传递命令后,我在下面显示的终端中获得了输出,

enter image description here

在我的弹性搜索数据库中创建的名称my_fluentd_index中没有索引。使用一些解决方案来帮助我,使用elastic search

将我的CSV数据提取到fluentd数据库中
elasticsearch kibana elastic-stack elasticsearch-5 fluentd
1个回答
0
投票

经历同样的问题,我正在获取索引,但是索引中没有数据,我想指出的是,在type_name之后我添加了flush_interval 10s

© www.soinside.com 2019 - 2024. All rights reserved.