Home > other >  Logstash date is invalid
Logstash date is invalid

Time:09-24

Just get started ELK, checked a day or two, in logstash filter transformation for date fields, no matter what all don't succeed, a great god help to find out what is going on, thanks!

Customer_No, TransDate , Pro_No Seq_No, Trans_Amount
108245579, 20190325201822, 1178120, 6, 10

Input
{
The file {
Path=& gt; ["/CSV/*. CSV "]
Start_position=& gt; "Beginning"
}
}
The filter {
CSV {
The separator=& gt; ", "
The columns=& gt; [" Customer_No TransDate ", ""," Pro_No ", "Seq_No", "Trans_Amount"]
}
Mutate {
The convert=& gt; {
"Customer_No=& gt;" "String"
"TransDate=& gt;" "String"
"Pro_No=& gt;" "String"
"Trans_Amount=& gt;" "Float"
}
}
The date {
Timezone=& gt; "Asia/Shanghai"
Match=& gt; [" TransDate yyyyMMddHHmmss ", ""," MM - dd yyyy - HH: MM: ss "]
Target=& gt; "TransDate
"}
}
The output {
Elasticsearch {
Hosts=& gt; [" elasticsearch: 9200 "]
The index=& gt; "Transaction"
}
}

  • Related