Install Opensearch output plugin on Windows?


Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
I’m using Opensearch / Opensearch Dashboards 2.8 on Windows server machine.

Describe the issue:
I’m trying to index data into Opensearch using a Logstash 7.10.2. However, I’m on Windows so I can’t have to opensearch output plugin…

Because of that, I always have the following error :

[2023-01-20T18:36:22,391][ERROR][logstash.outputs.elasticsearch][pipeline_talend_integration][fb11f0d10cc2223adc57b45e4be793eb6d7729175e0a262f49a5fa80d7520cd0] Encountered a retryable error. Will Retry with exponential backoff {:code=>400, :url=>“https://localhost:9200/_bulk”, :body=>“{“error”:{“root_cause”:[{“type”:“illegal_argument_exception”,“reason”:“Action/metadata line [1] contains an unknown parameter [_type]”}],“type”:“illegal_argument_exception”,“reason”:“Action/metadata line [1] contains an unknown parameter [_type]”},“status”:400}”}

I have several questions :

  • Is there a way to install Opensearch Output Plugin on Windows?
  • If it’s not possible, how index data into Opensearch 2.x using Logstash 7.10 (or a more recent Logstash)?

best regards!

Hey @vincent2mots

I have not used opensearch/Opensearch dashboards and/or Logstash on winodws. But you should be able to use something like this with Logstash config

input {
  udp {
    port => 5140
    type => "syslog"

output {
  elasticsearch { hosts => ["localhost:9200"] }
  stdout { codec => rubydebug }

Found here

Finally, I was able to solve my problem :

  1. I installed a Ubuntu Desktop VM on which I downloaded Logstash OSS with output-opensearch plugin embedded
  2. I used the following command to export the plugin :
bin/logstash-plugin prepare-offline-pack --output --overwrite logstash-output-opensearch
  1. I installed the plugin on a Windows Logstash OSS 8.6.1 :
bin/logstash-plugin install file:///d:/BINAIRES/

I described the process here

A small gift : the link to the plugin, in case someone needs it : here

Best regards,