User-defined Playground

OpenSearch Playground

OpenSearch is an open-source, enterprise-grade search and observability suite that brings order to unstructured data at scale.

Startup configuration
opensearch
OpenSearch playground: OpenSearch is an open-source, enterprise-grade search and observability suite that brings order to unstructured data at scale.

🔧 System Components

  • opensearch: The core search and analytics engine.
  • opensearch-dashboards: Web-based visualization and exploration interface (similar to Kibana).

🛠️ Tools

  • curl: Primary tool for interacting with OpenSearch REST API.
  • jq: JSON processor for formatting and filtering API responses.

🎯 Getting Started

Authentication

OpenSearch requires authentication for all operations.

The administrator credentials are:

  • 👤 Username: admin
  • 🔒 Password: Iximiuz123!

You can authenticate using:

# Using credentials directly
curl -u admin:Iximiuz123! -k "https://localhost:9200/_cluster/health" | jq

# Using .netrc file (recommended)
curl -n -k "https://localhost:9200/_cluster/health" | jq

OpenSearch uses a self-signed TLS certificate. Use the -k flag with curl to skip certificate verification.

Check Cluster Health

# Check cluster status
curl -nk "https://localhost:9200/_cluster/health" | jq

# Get basic cluster info
curl -nk "https://localhost:9200/" | jq

# List all nodes
curl -nk "https://localhost:9200/_cat/nodes?v"

Working with Indices

# List all indices
curl -nk "https://localhost:9200/_cat/indices?v"

# Get index details
curl -nk "https://localhost:9200/.opendistro_security" | jq

⚙️ Configuration

OpenSearch Configuration

Main configuration file: /etc/opensearch/opensearch.yml

# Edit configuration
sudoedit /etc/opensearch/opensearch.yml

# Restart service after changes
sudo systemctl restart opensearch

OpenSearch Dashboards Configuration

Configuration file: /etc/opensearch-dashboards/opensearch_dashboards.yml

# Edit dashboards configuration
sudoedit /etc/opensearch-dashboards/opensearch_dashboards.yml

# Restart service
sudo systemctl restart opensearch-dashboards

📚 Learn More

Happy learning! 🚀

Start
Settings