I have a project in (A.B.C.D server). it is fetching data from third-party API. Now I want to store this data to my ES which is on a different server(P.L.M.N server). ELK server is connected with VPN ( openVPN ) and its IP address W.X.Y.Z . Now I am creating logtsash json file on my server. but failed to create the with json file with logstash conf file which is in VPN.
in my localhost, I can do everything but need help with this. unable to write the proper conf file I guess.
My logstash conf file sample
input {
file {
path => "/etc/logstash/review_data.json"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => "json"
}
}
filter {
json {
source => "message"
}
}
output {
#stdout { codec => rubydebug }
elasticsearch {
hosts => ["http://P.L.M.N:9200/"]
index => "data_student"
document_id => "%{id}"
template =>"/etc/logstash/review_template.json"
template_name=>"tem_student"
template_overwrite => true
}
}
thanks @inandi