AV94
AV94

Reputation: 1814

Configure output as elasticsearch in logstash

I'm working on an elasticsearch project where I want to get data from Amazon s3.for this,I'm using logstash.To configure,

output{
   elasticsearch{
      host => 'host_'
      cluster => 'cluster_name'
   }
}

is the usual approach. But,I'm using Amazon elasticsearch service. It has only end-point and Domain ARN. How should I specify host name in this case?

Upvotes: 2

Views: 3369

Answers (1)

Val
Val

Reputation: 217514

In the simplest case where your ES cluster on AWS is open to the world, you can have a simple elasticsearch output config like this:

For Logstash 2.0:

output {
  elasticsearch{
    hosts => 'search-xxxxxxxxxxxx.us-west-2.es.amazonaws.com:80'
  }  
}
  • don't forget the port number at the end
  • make sure to use the hosts setting (not host)

For Logstash 1.5.x:

output {
  elasticsearch{
    host => 'search-xxxxxxxxxxxx.us-west-2.es.amazonaws.com'
    port => 80
    protocol => 'http'
  }  
}
  • the port number is a separate setting named port
  • make sure to use the host setting (not hosts), i.e. opposite than with 2.0

Upvotes: 10

Related Questions