OpenSearch

From Wikipedia:OpenSearch (software):

OpenSearch is a family of software consisting of a search engine (also named OpenSearch), and OpenSearch Dashboards, a data visualization dashboard for that search engine. The software started in 2021 as a fork of Elasticsearch and Kibana, with development led by Amazon Web Services.

Installation

Install the opensearch package.

Various plugins are listed as optional dependencies which can be installed according to your needs. If you are using opensearch-dashboards remember to install the corresponding Dashboards plugins.

Running

If you do not have a keystore at /etc/opensearch/opensearch.keystore, you need to create one before starting OpenSearch:

# opensearch-keystore create

Afterwards, you can start/enable opensearch.service.

Ensure OpenSearch is running and accessible by using curl, curl '<protocol>://<host>:<port>':

curl http://127.0.0.1:9200
{
  "name" : "opensearch.example.net",
  "cluster_name" : "opensearch",
  "cluster_uuid" : "TRylpzbsQB-Nk2KgktTQtA",
  "version" : {
    "number" : "7.10.2",
    "build_type" : "tar",
    "build_hash" : "unknown",
    "build_date" : "2022-01-07T15:57:30.358290Z",
    "build_snapshot" : false,
    "lucene_version" : "8.10.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"
}

Configuration

The main OpenSearch configuration file is well-documented and located at /etc/opensearch/opensearch.yml. The official documentation should prove helpful as well.

  • By default OpenSearch is public accessible, it may be preferred to allow only access on the host instead:
network.host: 127.0.0.1
  • It is possible to use a custom port instead of the default 9200:
http.port: 9200

Usage

The OpenSearch server management (document maintenance, performing search, etc.) is usually done by clients that should provide a seamless integration with the preferred programming language.

Useful tools to manage OpenSearch instances and clusters like opensearch-dashboards and opensearch-cli are also available to simplify management.

Upgrading from Elasticsearch OSS

To upgrade multi-node clusters of Elasticsearch OSS to OpenSearch one should consult the official guide.

For standalone nodes it might suffice to copy any configuration changes and move the index data to its new location:

Stop

# cp -r /var/lib/elasticsearch/nodes /var/lib/opensearch/
# chown opensearch:opensearch -R /var/lib/opensearch

Start opensearch.service

Compatibility with Beats OSS

Beats agents like filebeat are not compatible with OpenSearch in newer versions, the official documentation provides compatibility tables. Versions 7.13.X and above will not work and all versions need a workaround in the configuration:

This will make OpenSearch return as its version number.

Agent versions compatible with the above workaround are available:

gollark: Yours basically just leaves it entirely up to your discretion.
gollark: Seriously? That's your problem with these rules, but your 3-rule ruleset is FINE?
gollark: There are 10 of them, look.
gollark: Also, we don't have evidence now, unless we go back a lot, but R10's new wording is recent and I doubt you would be in favour of retroactively punishing things.
gollark: I have read it, yes.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.