Elastic

Search and analyze data via Elasticsearch API. Index, search, and manage clusters.

modbender Updated 12 repo stars

File contents

Elasticsearch

Distributed search and analytics.

Environment

export ELASTICSEARCH_URL="https://elastic.example.com:9200"
export ELASTICSEARCH_API_KEY="xxxxxxxxxx"

Cluster Health

curl "$ELASTICSEARCH_URL/_cluster/health" -H "Authorization: ApiKey $ELASTICSEARCH_API_KEY"

Search

curl -X POST "$ELASTICSEARCH_URL/my-index/_search" \
  -H "Authorization: ApiKey $ELASTICSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": {"match": {"message": "error"}}}'

Index Document

curl -X POST "$ELASTICSEARCH_URL/my-index/_doc" \
  -H "Authorization: ApiKey $ELASTICSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Log entry", "timestamp": "2024-01-30T10:00:00Z"}'

Links

modbender/skill-library-mcp/tree/main/data/elastic commit 6a4c50a289

Frequently asked questions

npx skillmds@latest add modbender/elastic