How Externalise OpenSearch

Please follow the on-screen options and the steps below to externalise OpenSearch through MCS.

Create OpenSearch Cluster

Name

Domain name: mcs-opensearch (The domain name can be changed)

Domain creation method

Standard create

Templates

Dev/test

image-20240520-135911.png

 

Deployment Option(s)

Deployment Option(s) : Domain without standby

Availability Zone(s): 1-AZ

Engine options

Engine version can be 1.3 or latest 2.11.

image-20240521-060204.png

 

Data nodes

Instance type : t3.small.search

Number of nodes : 1

EBS storage size per node : 20

 

 

Network

Network : VPC access for more security and no access from public internet.

IP address type : IPv4 only

 

 

Fine-grained access control

Master username: mcs-opensearch

Master password: mcsOpense@rc4

 

Only use fine-grained access control

After creation check if the policy code if "Effect" = "Allow" under Access policy

 

Make changes on MCS

Edit the .env file as shown below.

## ELASTICSEARCH_HOSTS - address of the database. Can be a single node: ELASTICSEARCH_HOSTS="https://address1:9200" ## or multiple nodes: ELASTICSEARCH_HOSTS="http://es1:9200 http://es2:9200" ELASTICSEARCH_HOSTS="https://search-mcs-opensearch-ahzbcbz2ba7hq3bb6perdrlxu4.eu-west-2.es.amazonaws.com:443" ## EXTERNAL_LOG_DB TYPE - Choose one of the following options (case sensitive!): "elasticsearch" | "opensearch" | "disabled" ## This configuration will select the set of Logstash pipelines for sending data from Redis. Requires restart of MCS to take effect. ## "elasticsearch" - send data to elasticsearch database using elasticsearch output plugin ## "opensearch" - send data to opensearch database using opensearch output plugin ## "disabled" - drop all data and don't store it at all EXTERNAL_LOG_DB_TYPE="opensearch" ## Elasticsearch/Opensearch db credentials ELASTIC_USER=mcs-opensearch ELASTIC_PASSWORD='mcsOpense@rc4'

ELASTICSEARCH_HOSTS must have explicit port definition

 

For Troubleshooting and Logs:

Docker-composer.yml : change logging level of logstash/environment/log.level from “error” to “info”

Logstash:

logging: *default-logging image: registry.tagvs.com/mcs_logstash:latest restart: "unless-stopped" # ports: # - "5044:5044" # - "5000:5000/tcp" # - "5000:5000/udp" # - "9600:9600" environment: - log.level="info" - pipeline.workers=${LS_WORKERS-6}

 

And run the following command

MCS> docker logs mcs-logstash-1 -f

 

Verify the MCS if Open Search is correctly configured under MCS → Redundancy