Some logs from the same LS instance are not being imported into ES. I see the following notification in ES when sending just the problem logs to ES; "the indices which match this index pattern don't contain any time fields". LS appears to be parsing the logs just fine. All logs are single line JSON formatted. It looks like the "@timestamp" filter is working for all the logs except the problem ones even though when I look at the LS debug output all looks good for all logs.
My date filter:
date {
match => ["timestamp", "yyyy-MM-dd HH:mm:ss"]
timezone => "UTC"
target => "@timestamp"
remove_field => ["timestamp"]
}
The "timestamp" field before LS:
"timestamp": "2017-09-11 21:52:45"
The "@timestamp" field after the date filter is applied:
"@timestamp"=>2017-09-11T21:52:45.000Z
Not sure what I'm screwing up or if this really is the source of the problem.
Raw JSON log:
{"tcp_flags": 16, "icmp_code": null, "tcp_win": 1024, "tcp_ack": 2915778850, "tcp_urp": 0, "icmp_type": null, "ip_len": 52, "src_ip": "10.10.10.10", "src_port": 39686, "ip_hlen": 5, "ip_off": 0, "tcp_csum": 43620, "ip_ttl": 64, "sid": 4, "ip_tos": 0, "ip_csum": 32849, "tcp_res": 0, "status": 0, "t_url": "https://192.168.1.3/alert.php?&testing=5", "timestamp": "2017-09-11 21:52:45", "ip_ver": 4, "ip_flags": 2, "tcp_off": 8, "ip_id": 57472, "cid": 5493, "DataType": "ids", "tcp_seq": 1593577001, "dst_port": 443, "signature": "ALLERT Raised on traffic", "ip_proto": 6, "dst_ip": "2.3.4.5", "CustID": "Test"}
LS processed log:
{"event"=>{"icmp_type"=>nil, "ip_proto"=>6, "ip_tos"=>0, "signature"=>"ALLERT Raised on traffic", "tcp_off"=>8, "ip_id"=>57472, "tcp_urp"=>0, "dst_ip"=>"2.3.4.5", "sid"=>4, "ip_ver"=>4, "src_ip"=>"10.10.10.10", "ip_ttl"=>64, "ip_off"=>0, "tcp_flags"=>16, "ip_csum"=>32849, "tcp_seq"=>1593577001, "@version"=>"1", "host"=>"test", "DataType"=>"ids", "src_geoip"=>{}, "icmp_code"=>nil, "tcp_res"=>0, "tcp_win"=>1024, "ip_flags"=>2, "src_port"=>39686, "tcp_ack"=>2915778850, "@timestamp"=>2017-09-11T21:52:45.000Z, "CustID"=>"Test", "dst_port"=>443, "t_url"=>"https://192.168.1.3/alert.php?&testing=5", "ip_hlen"=>5, "ip_len"=>52, "tcp_csum"=>43620, "cid"=>5493}}