Alaoui
(Ali)
January 18, 2019, 2:39pm
1
I want to upload a json file but it doesn t work, this is my config file
input{
file{
type => "json"
path => "D:\Js.json"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter{
json{
source => "message"
}
}
output{
elasticsearch{
hosts => "localhost:9200"
index => "xoxoxo"
document_type => "xoxoxofiles"
}
stdout{}
}
and this my json file :
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}
dadoonet
(David Pilato)
January 18, 2019, 4:20pm
2
Are you sure you want to use logstash for that?
Alaoui
(Ali)
January 18, 2019, 4:24pm
3
yes , because my boss told me to upload 100 json files using logstash what i should to use then !!!!!
dadoonet
(David Pilato)
January 18, 2019, 4:39pm
4
curl in a shell script...
I mean that I'd not try to complicate things unless you need to do advanced transformations...
Alaoui
(Ali)
January 18, 2019, 4:43pm
5
can we talke in a private using email ?? if its okey
dadoonet
(David Pilato)
January 18, 2019, 5:06pm
6
Unless you want to share secret settings, I prefer keeping the discussion here as it can help the community and the community can also help.
This is the setting for Linux, but as it looks like you are using Windows it should probably be sincedb_path => "NUL"
instead.
As your JSON object seems to span multiple lines, you will need to also use a multiline codec .
Recent version of Elasticsearch only support a single type per index, so you can probably remove this.
system
(system)
Closed
February 15, 2019, 5:11pm
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.