kibana-streams by elastic/agent-skills
npx skills add https://github.com/elastic/agent-skills --skill kibana-streams通过 Kibana Streams REST API 读取流元数据、设置、查询、重要事件和附件,并管理流生命周期(启用、禁用、重新同步)。流是 Kibana 中管理数据的一种实验性方式——API 和行为可能会发生变化。此技能仅涵盖读取操作和生命周期管理;创建、更新、删除、分叉和其他变更操作可能在后续版本中添加。
有关详细的端点和参数,请参阅 references/streams-api-reference.md。
| 项目 | 描述 |
|---|---|
| Kibana URL | Kibana 端点(例如 https://localhost:5601 或云部署 URL) |
| 身份验证 | API 密钥或基本身份验证(请参阅 elasticsearch-authn 技能) |
| 权限 | 读取操作需要 read_stream 权限;生命周期 API 需要相应的权限 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
在非默认空间内操作时,请使用空间范围的路径 /s/{space_id}/api/streams。
<kibana_url>/api/streams(或对于空间使用 /s/<space_id>/api/streams)发送 GET 或 POST 请求。POST /api/streams/_disable、_enable 和 _resync 是变更操作——根据您的 Kibana 版本要求,发送 kbn-xsrf: true(或等效内容)。| 操作 | 方法 | 路径 |
|---|---|---|
| 获取流列表 | GET | /api/streams |
| 获取单个流 | GET | /api/streams/{name} |
| 获取流摄取设置 | GET | /api/streams/{name}/_ingest |
| 获取流查询设置 | GET | /api/streams/{name}/_query |
| 获取流查询 | GET | /api/streams/{name}/queries |
| 读取重要事件 | GET | /api/streams/{name}/significant_events |
| 获取流附件 | GET | /api/streams/{streamName}/attachments |
| 操作 | 方法 | 路径 |
|---|---|---|
| 禁用流 | POST | /api/streams/_disable |
| 启用流 | POST | /api/streams/_enable |
| 重新同步流 | POST | /api/streams/_resync |
路径参数:{name} 和 {streamName} 是流标识符(相同值;API 文档使用了这两个名称)。
摄取设置(GET /api/streams/{name}/_ingest)暴露了两个独立的生命周期区域:
ingest.lifecycle) —— 控制流数据的保留时间。使用 lifecycle.dsl.data_retention(例如 "30d")进行显式保留,或对于子流使用 lifecycle.inherit。当用户要求“设置保留期”、“更新保留期”或“更改流的保留期”时,通常指的就是这个。ingest.failure_store.lifecycle) —— 仅控制失败文档(未成功处理的文档)的保留。用户很少需要更改此设置,除非他们明确提到故障存储或失败文档保留期。当用户要求设置或更新保留期时,目标是流的主生命周期(lifecycle.dsl.data_retention),而不是故障存储,除非他们特别询问故障存储或失败文档。
curl -X GET "${KIBANA_URL}/api/streams" \
-H "Authorization: ApiKey <base64-api-key>"
curl -X GET "${KIBANA_URL}/api/streams/my-stream" \
-H "Authorization: ApiKey <base64-api-key>"
curl -X GET "${KIBANA_URL}/api/streams/my-stream/queries" \
-H "Authorization: ApiKey <base64-api-key>"
# 重要事件
curl -X GET "${KIBANA_URL}/api/streams/my-stream/significant_events" \
-H "Authorization: ApiKey <base64-api-key>"
# 附件(链接到流的仪表板、规则、SLO)
curl -X GET "${KIBANA_URL}/api/streams/my-stream/attachments" \
-H "Authorization: ApiKey <base64-api-key>"
# 禁用流(请求体请参考 API 文档)—— 在继续之前警告用户并确认
curl -X POST "${KIBANA_URL}/api/streams/_disable" \
-H "Authorization: ApiKey <base64-api-key>" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{}'
# 启用流
curl -X POST "${KIBANA_URL}/api/streams/_enable" \
-H "Authorization: ApiKey <base64-api-key>" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{}'
# 重新同步流
curl -X POST "${KIBANA_URL}/api/streams/_resync" \
-H "Authorization: ApiKey <base64-api-key>" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{}'
有关请求/响应体(例如,如果需要,_disable/_enable/_resync 的请求体),请查看 Streams API 操作页面。
ingest.lifecycle / lifecycle.dsl.data_retention)。除非他们明确询问故障存储或失败文档,否则不要仅更改故障存储的保留期。每周安装数
144
代码仓库
GitHub 星标数
89
首次出现
10 天前
安全审计
已安装于
cursor126
github-copilot120
opencode119
gemini-cli119
codex119
amp118
Read stream metadata, settings, queries, significant events, and attachments, and manage stream lifecycle (enable, disable, resync) via the Kibana Streams REST API. Streams are an experimental way to manage data in Kibana — expect API and behavior changes. This skill covers read operations and lifecycle only; create, update, delete, fork, and other mutating operations may be added in a later version.
For detailed endpoints and parameters, see references/streams-api-reference.md.
| Item | Description |
|---|---|
| Kibana URL | Kibana endpoint (e.g. https://localhost:5601 or a Cloud deployment URL) |
| Authentication | API key or basic auth (see the elasticsearch-authn skill) |
| Privileges | read_stream for read operations; appropriate privilege for lifecycle APIs |
Use the space-scoped path /s/{space_id}/api/streams when operating in a non-default space.
GET or POST to <kibana_url>/api/streams (or /s/<space_id>/api/streams for a space).POST /api/streams/_disable, _enable, and _resync are mutating — send kbn-xsrf: true (or equivalent) as required by your Kibana version.| Operation | Method | Path |
|---|---|---|
| Get stream list | GET | /api/streams |
| Get a stream | GET | /api/streams/{name} |
| Get ingest stream settings | GET | /api/streams/{name}/_ingest |
| Get query stream settings | GET | /api/streams/{name}/_query |
| Get stream queries | GET | /api/streams/{name}/queries |
| Operation | Method | Path |
|---|---|---|
| Disable streams | POST | /api/streams/_disable |
| Enable streams | POST | /api/streams/_enable |
| Resync streams | POST | /api/streams/_resync |
Path parameters: {name} and {streamName} are the stream identifier (same value; the API docs use both names).
Ingest settings (GET /api/streams/{name}/_ingest) expose two separate lifecycle areas:
ingest.lifecycle) — Controls how long the stream's data is retained. Use lifecycle.dsl.data_retention (e.g. "30d") for explicit retention, or lifecycle.inherit for child streams. This is what users usually mean when they ask to "set retention", "update retention", or "change the stream's retention".ingest.failure_store.lifecycle) — Controls retention of failed documents only (documents that did not process successfully). Users rarely need to change this unless they explicitly mention the failure store or failed-document retention.When a user asks to set or update retention, target the stream's main lifecycle (lifecycle.dsl.data_retention), not the failure store, unless they specifically ask about failure store or failed documents.
curl -X GET "${KIBANA_URL}/api/streams" \
-H "Authorization: ApiKey <base64-api-key>"
curl -X GET "${KIBANA_URL}/api/streams/my-stream" \
-H "Authorization: ApiKey <base64-api-key>"
curl -X GET "${KIBANA_URL}/api/streams/my-stream/queries" \
-H "Authorization: ApiKey <base64-api-key>"
# Significant events
curl -X GET "${KIBANA_URL}/api/streams/my-stream/significant_events" \
-H "Authorization: ApiKey <base64-api-key>"
# Attachments (dashboards, rules, SLOs linked to the stream)
curl -X GET "${KIBANA_URL}/api/streams/my-stream/attachments" \
-H "Authorization: ApiKey <base64-api-key>"
# Disable streams (request body per API docs) — warn user and confirm before proceeding
curl -X POST "${KIBANA_URL}/api/streams/_disable" \
-H "Authorization: ApiKey <base64-api-key>" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{}'
# Enable streams
curl -X POST "${KIBANA_URL}/api/streams/_enable" \
-H "Authorization: ApiKey <base64-api-key>" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{}'
# Resync streams
curl -X POST "${KIBANA_URL}/api/streams/_resync" \
-H "Authorization: ApiKey <base64-api-key>" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{}'
Check the Streams API operation pages for request/response bodies (e.g. request body for _disable/_enable/_resync if required).
ingest.lifecycle / lifecycle.dsl.data_retention). Do not change only the failure store retention unless they explicitly ask about the failure store or failed documents.Weekly Installs
144
Repository
GitHub Stars
89
First Seen
10 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
cursor126
github-copilot120
opencode119
gemini-cli119
codex119
amp118
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
51,800 周安装
| Read significant events | GET | /api/streams/{name}/significant_events |
| Get stream attachments | GET | /api/streams/{streamName}/attachments |