Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 556
AV94 Avatar asked Dec 20 '25 17:12

AV94


1 Answers

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
like image 122
Val Avatar answered Dec 22 '25 09:12

Val



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!