title: Filebeat configuration with Opensearch in Virtualbox
body: <p>I have installed Filebeat for forwarding and centralizing log data. Filebeat is mainly used with Elasticsearch (directly sends the transactions). I use Opensearch and OpenSearch Dashboards instead of Elasticsearch and Kibana (Opensearch is a forked search project based on old versions of Elasticsearch and Kibana).
  Both, Filebeat and Opensearch are installed as tarballs on my VirtualBox VDI.
  I currently use this config file: (comments removed)</p>
  <pre><code>###################### Filebeat Configuration #########################
  
  
  filebeat.inputs:
  ma- type: log
    enabled: false
    paths:
      - /var/log/*.log
  
  
  filebeat.config.modules:
    path: ${path.config}/modules.d/*.yml
    reload.enabled: false
  
  setup.template.settings:
    index.number_of_shards: 1
  setup.kibana:
  
    host: &quot;localhost:5601&quot;
  
  output.elasticsearch:
    # Array of hosts to connect to.
    hosts: [&quot;localhost:9200&quot;]
  
    username: &quot;admin&quot;
    password: &quot;admin&quot;
  
  processors:
    
    - decode_json_fields:
        fields: [&quot;message&quot;]
        overwrite_keys: true
        target: &quot;&quot;
  </code></pre>
  <p>However, still cannot run ./filebeat setup -e
  and get error:</p>
  <pre><code>2021-09-23T17:55:11.865+0300    ERROR   instance/beat.go:989    Exiting: couldn't connect to any of the configured Elasticsearch hosts. Errors: [error connecting to Elasticsearch at http://localhost:9200: Get &quot;http://localhost:9200&quot;: dial tcp 127.0.0.1:9200: connect: connection refused]
  Exiting: couldn't connect to any of the configured Elasticsearch hosts. Errors: [error connecting to Elasticsearch at http://localhost:9200: Get &quot;http://localhost:9200&quot;: dial tcp 127.0.0.1:9200: connect: connection refused]
  </code></pre>
  <p>I use opensearch-1.0.1 version, and was able to run Opensearch without issues. But can somebody enlight me, how to connect Filebeat with Opensearch, if both are installed as tarballs?</p>
  <p>Thank you!</p>