In addition to the question I just raised, I would like to retain the type specified when calling Logstash (see curl request) - also within elastic. Right now, If I call logstash using the curl request below, Logstash Inserts the entry into Elastic with the logs type within the logstash-* index. What I'm looking to do is to use the aws-metrics as the type instead of logs default. How would I achieve this?
curl -H "content-type: application/json" -XPUT 'http://10.222.51.58:8080/aws-metrics' --data '@/C/Users/Temp/Desktop/my-file.json'
output {
stdout {
codec => rubydebug
}
if[request_path] == "/aws-metrics" {
elasticsearch {
hosts => ["https://elasticsearch.myhost.com:443/"]
index => "myapp-ls-%{+YYYY.MM.dd}"
user => "elastic"
password => "elastic"
}
}
}