"type"=>"illegal_argument_exception", "reason"=>"cannot parse empty date"} in logstash logs


Getting an error on pushing logs to logstash to elasticseacrch,

"error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [message] of type [date] in document with id 'NVWQaIMBa0kW_rfG7Lb1'", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"cannot parse empty date"}}}}}

As per error, cannot parse empty date, but in the logs there is a key called "time", Any idea of this issue ?

But here are sample logs in my application servers,

{"level":"info","message":"2022-09-23T05:30:12.474630702Z","msg":"poll started at time","time":"2022-09-23T05:30:12Z"}
{"level":"info","msg":"Supervisor can't run, going to sleep","tenant":"event_aigsubscription","time":"2022-09-23T05:30:12Z"}
{"error":"mongo: no documents in result","level":"error","msg":"fail to find lock by criteria","time":"2022-09-23T05:30:12Z"}
{"error":"mongo: no documents in result","level":"error","msg":"fail to find lock by criteria while poll","time":"2022-09-23T05:30:12Z"}


What does your logstash config look like?

Thanks for your reply,

Here is the logstash configs,


input {
beats {
port => 5000
host => ""
client_inactivity_timeout => "1200"

input {
beats {
port => 5001
ssl => true
ssl_certificate_authorities => ["/etc/logstash/cert/circles.chained.crt"]
ssl_certificate => "/etc/logstash/cert/circles.crt"
ssl_key => "/etc/logstash/cert/circles.key"
ssl_verify_mode => "force_peer"
host => ""


output {
elasticsearch {
hosts => ["","",""]
ssl => false
ssl_certificate_verification => false
cacert => "/etc/logstash/root-ca.pem"
user => "logstash"
password => "xxxxxxxxxxxxxxxxx"
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"


pipeline.batch.size: 125
pipeline.batch.delay: 100
config.reload.automatic: false
dead_letter_queue.enable: false
http.host: ""
path.logs: /var/log/logstash/
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.username: logstash_system
xpack.monitoring.elasticsearch.password: xxxxxxxxxxxxxxx
xpack.monitoring.elasticsearch.hosts: ["","",""]
xpack.monitoring.elasticsearch.sniffing: false