I have an Elastic Stack
server (on Hyper-v
) that is ingesting data via a logstash
exec
command and performing analytics on it. Everything is working great except a date field that is being displayed as a number.
How do I get logstash
, Elasticsearch
or Kibana
to recognize the field s a date instead of a number?
The data is Unix epoch
time in milliseconds
.
Code:
Data outputted by the python
file is in JSON
format. No real processing is taking place until it hits elasticsearch
.
Logstash config:
input {
exec {
command => "/home/elliot/BullhornConnector.py JobOrder isOpen,webResponses,submissions,sendouts,interviews,placements,address,numOpenings,employmentType,owner,title,clientCorporation"
interval => 60
codec => json
tags => ["JobOrder"]
}
exec {
command => "/home/elliot/BullhornConnector.py Lead owner,leadSource,firstName,lastName,status,dateAdded"
interval => 60
codec => json
tags => ["Lead"]
}
exec {
command => "/home/elliot/BullhornConnector.py Opportunity owner,isOpen,dealValue,weightedDealValue,clientCorporation,status"
interval => 60
codec => json
tags => ["Opportunity"]
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
}
stdout { codec => rubydebug }
}
Screen shots:
Here is a screenshot of the raw data:
Thanks!