Ramon_Mateo
(Ramon Mateo)
February 17, 2020, 10:23am
#1
Hi.
I have a problem with my input and pipeline. i'm new with pipelines and json filter.
I don't know how to get logstash filter my json files and send to elasticsearch.
This a exemple of my json file:
{"tenantID": 80454, "Size": 0.02, "FirstDate": "21/12/2019 08:29:08", "LastDate": "21/12/2019 22:45:32"}
And this is my actual pipeline for json files:
input {
file {
type => "json"
path => "/usr/share/logstash/inputlogs/*.json"
start_position => "beginning"
sincedb_path => "/usr/share/logstash/.sincedb"
}
}
filter {
json {
source => "message"
}
}
output {
elasticsearch {
hosts => "elasticsearch:9200"
index => "lab-benchmarking-json"
}
stdout {}
}
what it's wrong with my pipeline??
Thanks for advanced.
ITIC
(Jordi)
February 17, 2020, 10:32am
#2
Hi
What is the output of your stdout{}
and how doees it differ from what you expect/need?
Ramon_Mateo
(Ramon Mateo)
February 17, 2020, 10:36am
#3
Hi i can't see any output on logstash it's strange. And i need elastic create a index for this and i expect see all fields that my json file has on elasticsearch.
Thanks for advanced.
Jasonespo
(JasonE)
February 17, 2020, 10:38am
#4
Have you checked /var/log/logstash for any errors?
Have you created the index in elasticsearch first before trying to index? Do this through Kibana
Ramon_Mateo
(Ramon Mateo)
February 17, 2020, 10:48am
#5
Don't show any error.
Index is created on logstash with output.
system
(system)
closed
March 16, 2020, 10:48am
#6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.