New to ELK stack, trying to import my JSON data into elastic serach, but its fails, since my json input is nested types. I have tried many solution but still i could not able to get.
here is my input
{
"Folders": [
{
"Name": "Folder1",
"Total Files": [
{
"Added": 44488,
"Deleted": 4444,
"Total files by extension": [
{
"Name": ".txt,exe",
"Added": 44488,
"Deleted": 4444
},
{
"Name": ".doc",
"Added": 44488,
"Deleted": 4444
}
]
}
]
},
{
"Name": "Folder2",
"Total Files": [
{
"Added": 44488,
"Deleted": 4444,
"Total files by extension": [
{
"Name": ".txt,.exe",
"Added": 44488,
"Deleted": 4444
},
{
"Name": ".doc",
"Added": 44488,
"Deleted": 4444
}
]
}
]
}
]
}
Config file
input {
file {
path => "D:/sample.json"
start_position => "beginning"
type => "json"
codec => "json"
sincedb_path => "/dev/null"
}
}
filter {
if [message] drop {}
}
output {
stdout {
codec => rubydebug
}
# Sending properly parsed log events to elasticsearch
elasticsearch {
hosts => ["localhost:9200"]
index => "results"
}
}
Any help on this?