Input as elasticsearch and output to logstash

Hello All,

i have a use case where i need to use my elastic indices to use and dumps to the another logstash clusters (graylog opensearch indices) system
is it worthy to use the logstash and get input as my elasticsearch indices and output to the graylog cluster logstash.

i am trying with this POC , kindly suggest if is there any other better approch too . below is my logstash config -

input {
   elasticsearch {
        hosts => [ "https://app1a.uat.abc.com:9210", "https://app2a.uat.abc.com:9210", "https://app3a.uat.abc.com:9210" ]
        ssl => true
        ssl_certificate_verification => true
        user => "logstash-user"
        password => "$logstash-pwd"
        index => "myindex1-*"
        size => 10000
  }
}
output
{
 logstash {
  hosts => ["host2a.uat.abc.com"]
  port => 6019
  ssl => true
  ssl_certificate_authorities => ["/myssl/key.pem"]
        }
}

Hey Shailendra, I guess this is the best approach as logstash is capable to do all such ETL tasks. Let us know if you finding any difficulties.

Hi @ashishtiwari1993 , thanks for your response.

I am being trying the same approch further. i also getting the plugin errors as below pasted .

[2024-09-27T15:41:55,022][ERROR][logstash.plugins.registry] Unable to load plugin. {:type=>"output", :name=>"logstash"}
[2024-09-27T15:41:55,027][FATAL][logstash.runner          ] The given configuration is invalid. Reason: Unable to configure plugins: (PluginLoadingError) Couldn't find any output plugin named 'logstash'. Are you sure this is correct? Trying to load the logstash output plugin resulted in this error: Unable to load the requested plugin named logstash of type output. The plugin is not installed.

i have given my config as below -

output
{
 logstash {
  hosts => ["host2a.uat.abc.com"]
  port => 6019
  ssl => true
  ssl_certificate_authorities => ["/myssl/key.pem"]
        }
}

i have shared the complete in earlier post. can help or suggest me here thanks.

May I know which version of logstash you're using?

I am using logstash-8.13.2

You need to install that plugin -

./bin/logstash-plugin install logstash-integration-logstash

@ashishtiwari1993 , i understand it. but i dont have internet connections so i was testing the offline output plugin configurations but seems its failed .
may you help how do we create the output pluging without internet connections ? thanks in advance.

Hi Shailendra, You can refer this offline plugin management doc.