Hi All,
I use filter to extract the @time into a field of its own called "@time"
message ==> "@time": "2017-12-04T17:44:34"
"@timestamp" => 2017-12-28T12:29:22.096Z,
.conf file content
input {
file {
path => "/home/sdc/PycharmProjects/Kibana_Pro/utility/MAYOPETMR01_2017-12-04.gz.log"
type => "log"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
date {
match => ["@time","EEE MMM dd HH:mm:ss YYYY"]
target => "@timestamp"
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
sniffing => true
manage_template => false
index => "gesyslog_test"
document_type => "log"
}
stdout { codec => rubydebug }
}
Output:
{
"type" => "log",
"message" => "{"@time": "2017-12-04T17:44:34", "@code": "2212884484", "text": "Exception Class: Unknown Severity: Unknown\nFunction: ", "@systemID": "MA"NSP SCP:RfHubCanHWO::RfBias 5462", "detail": {"view_Level": "4", "seq_Num": "0", "name": null, "format": "1", "h_Name": "prtte1_Seq": "4767637676"}, "@type": "log"}",
"@version" => "1",
"path" => "/home/sdc/PycharmProjects/Kibana_Pro/utility/4444444_2017-12-04.gz.log",
"@timestamp" => 2017-12-28T12:29:22.096Z,
"host" => "sdc-VirtualBox"
}
It is not replacing it. Please help me