我正在使用flunetd
。我有一个看起来像这样的csv
文件。
我想使用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>
在终端中传递命令后,我在下面显示的终端中获得了输出,
在我的弹性搜索数据库中创建的名称my_fluentd_index
中没有索引。使用一些解决方案来帮助我,使用elastic search
fluentd
数据库中经历同样的问题,我正在获取索引,但是索引中没有数据,我想指出的是,在type_name之后我添加了flush_interval 10s