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)
###################### 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: "localhost:5601"
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
username: "admin"
password: "admin"
processors:
- decode_json_fields:
fields: ["message"]
overwrite_keys: true
target: ""
However, still cannot run ./filebeat setup -e and get error:
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 "http://localhost:9200": 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 "http://localhost:9200": dial tcp 127.0.0.1:9200: connect: connection refused]
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?
Thank you!