other
Elastic CLI for Cron Jobs
Use the Elastic CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 5 read 2 write Username and password auth
Elastic CLI for Cron Jobs
Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.
Use the headless CLI from cron when an operation should run without an interactive agent session. The Elastic CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Elastic CLI for Cron Jobs
kosmokrator integrations:configure elastic --enable --read allow --write ask --json
kosmo integrations:call elastic.elastic_list_indices '{}' --json Discovery Before Execution
Agents and scripts can inspect Elastic docs and schemas before choosing a function.
kosmo integrations:docs elastic --json
kosmo integrations:docs elastic.elastic_list_indices --json
kosmo integrations:schema elastic.elastic_list_indices --json
kosmo integrations:search "Elastic" --json
kosmo integrations:list --json Useful Elastic CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
elastic.elastic_list_indices | Read | none | List all indices in the Elasticsearch cluster. Returns index names, health status, document counts, and sizes. |
elastic.elastic_get_index | Read | index | Get detailed information about a specific Elasticsearch index, including mappings, settings, and aliases. |
elastic.elastic_create_index | Write | index, settings | Create a new Elasticsearch index with optional settings and mappings. |
elastic.elastic_search_documents | Read | index, query, size, from | Search for documents in an Elasticsearch index. Supports full query DSL including match, term, bool, and aggregation queries. |
elastic.elastic_index_document | Write | index, document, id | Create or update a document in an Elasticsearch index. Provide an ID to update an existing document, or omit it to let Elasticsearch auto-generate one. |
elastic.elastic_get_document | Read | index, id | Retrieve a single document from an Elasticsearch index by its ID. |
elastic.elastic_cluster_health | Read | none | Get the health status of the Elasticsearch cluster, including status (green/yellow/red), number of nodes, and shard information. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.