我已经安装td-agent
在Ubuntu18
. td-agent.conf
文件如下所示:
<source>
@type tail
path /home/thingtrax/Documents/ThingTraxDevice/pi/logs/zigbee/TX-S2-SKL-035_cycle.json
pos_file /home/thingtrax/Documents/ThingTraxDevice/pi/logs/zigbee/TX-S2-SKL-035_cycle.json.pos
format json
time_format %Y-%m-%d %H:%M:%S
tag health035
</source>
<filter **>
@type record_transformer
<record>
hostname ${hostname}
Customer "SKL"
Version "V2"
</record>
</filter>
<filter *035*>
@type record_transformer
<record>
EquipmentId "ACCUPACK3GD3"
</record>
</filter>
<match health035>
@type elasticsearch
hosts https://search-ttproduction-7fzlahn2oj4ofkkw2vre.eu-west-2.es.amazonaws.com/
user john
password admin@123
index_name health_skl_035
type_name health
</match>
上面的 td 代理文件是示例文件,但我有 70 个源文件,我将数据上传到这些源文件,elasticsearch
同样我有 70 个匹配文件。所以 td 代理文件很大,这就是为什么我只为 1 个源文件展示了它。现在的问题是 td 代理能够将所有数据上传到弹性搜索,我也可以在弹性搜索中看到数据。但我仍然在 td 代理日志文件中不断收到警告或错误:
2021-07-07 05:56:24 +0000 [警告]:#0 转储错误事件:error_class=Fluent::Plugin::ElasticsearchErrorHandler::ElasticsearchError error="400 - 被 Elasticsearch 拒绝" location=nil tag=" health035" 时间=2021-07-07 05:55:22.785788722 +0000 记录={"GatewayId"=>2, "input_1"=>1, "input_2"=>4, "NodeID"=>0, "固件" =>7, "counter"=>109, "sensor_id"=>244, "Sensor_name"=>"Other", "MsgMissed"=>0, "is_health"=>"Yes", "SignalStrength"=>74, “已创建”=>“2021-07-07T05:55:22.785491”、“MacGateway”=>“0013A20041AEC6AA”、“MacAdress_Sensor”=>“0013A20041C3672E”、“广播”=>“否”、“DeviceID"=>"TX-S2-SKL-035", "hostname"=>"TX-G1-318", "Customer"=>"SKL", "Version"=>"V2", "EquipmentId"=> “ACCUPACK3GD3”}
我无法理解这条错误消息,Rejected by Elasticsearch
但我仍然可以在弹性搜索中看到数据。此错误是否意味着我正在上传大量数据,并且由于流量的原因,在某些数据之间,有些数据被 elastisearch 拒绝了?如果这是真的,任何人都可以建议我如何处理大量数据,因为我有 70 个日志文件需要将数据上传到 elasticsearch。
谁能建议这个错误的含义。请帮忙谢谢。