Hi, I am new to ELK. I am trying to parse JSON strings that contain field name "source".
Here is an example:
{"feed": {"name": "AlienVault", "accuracy": 100.0, "url": "https://reputation.alienvault.com/reputation.data"}, "classification": {"type": "spam"}, "time": {"observation": "2016-05-15T16:57:03+00:00"}, "source": {"geolocation": {"latitude": 51.5332984924, "longitude": 0.699999988079, "cc": "GB", "city": "Southend"}, "ip": "163.172.198.227"}, "raw": "MTYzLjE3Mi4xOTguMjI3IzYjMiNTcGFtbWluZyNHQiNTb3V0aGVuZCM1MS41MzMyOTg0OTI0LDAuNjk5OTk5OTg4MDc5IzEy"}
In ElasticSearch /Kibana I have a field named "source" but it contains the path to the txt file where logs are stored. The output is:
"_source": {
"raw": "MjIyLjEzNi43MS4xOSMzIzIjU2Nhbm5pbmcgSG9zdCNDTiNaaGVuZ3pob3UjMzQuNjgzNjAxMzc5NCwxMTMuNTMyNTAxMjIxIzEx",
"source": "/opt/intelmq/var/lib/bots/file-output/events.txt",
"classification": {
"type": "scanner"
}
Somehow in ES I am missing these fields and their values:
"geolocation": {
"latitude": 51.5332984924,
"longitude": 0.699999988079,
"cc": "GB",
"city": "Southend"
},
"ip": "163.172.198.227"
Thanks