包规范
编辑包规范编辑
集成是一种类型的包,因此必须遵守 Elastic 包规范。包规范描述了
- 包的文件夹结构以及这些文件夹中预期的文件
- 预期文件内容的结构
资产组织编辑
通常,包中的资产按 <elastic-stack-component>/<asset-type>
组织。例如,摄取管道存储在 elasticsearch/ingest-pipeline
文件夹中。此逻辑适用于所有 Elasticsearch、Kibana 和 Agent 资产。
顶级资产被提取为 JSON 文档并推送到相应的 Elasticsearch 和 Kibana API。
数据流编辑
有一个名为 data_stream
的特定文件夹。每个数据流都应在此文件夹中拥有其资产文件夹,并且这些数据流的名称必须遵循数据流命名方案。
这些文件夹的内容遵循 <elastic-stack-component>/<asset-type>
结构。在安装过程中,Fleet 会强制执行数据流命名规则。此文件夹中的所有资产都直接或间接属于数据流。
在大多数情况下,只需要数据流资产。但是,在需要更多灵活性的情况下,需要全局资产。例如,应用于所有数据流的 ILM 策略。
支持的资产编辑
以下资产通常在 Elastic 包中找到
-
Elasticsearch
- 摄取管道
- 索引模板
- 转换
- 索引模板设置
-
Kibana
- 仪表盘
- 可视化
- 数据视图
- ML 模块
- 地图
- 搜索
- 安全规则
-
其他
- fields.yml
目录结构编辑
apache │ changelog.yml │ manifest.yml └───_dev └───data_stream └───docs └───img └───kibana
规范编辑
从 package-spec 存储库中包含。当规范更新时,这将更新。
## ## Entrypoint of "integration packages" specification. ## ## Describes the folders and files that make up a package. ## spec: additionalContents: true totalContentsLimit: 65535 totalSizeLimit: 250MB sizeLimit: 150MB configurationSizeLimit: 5MB relativePathSizeLimit: 3MB fieldsPerDataStreamLimit: 2048 contents: - description: The main package manifest file type: file contentMediaType: "application/x-yaml" sizeLimit: 5MB name: "manifest.yml" required: true $ref: "./manifest.spec.yml" - description: The package's CHANGELOG file type: file contentMediaType: "application/x-yaml" name: "changelog.yml" required: true $ref: "./changelog.spec.yml" - description: The package's NOTICE file type: file contentMediaType: "text/plain" name: "NOTICE.txt" required: false - description: The package's license file type: file contentMediaType: "text/plain" name: "LICENSE.txt" required: false - description: Folder containing data stream definitions type: folder name: data_stream required: false $ref: "./data_stream/spec.yml" - description: Folder containing documentation for the package type: folder name: docs required: true $ref: "./docs/spec.yml" - description: Folder containing agent-related definitions type: folder name: agent required: false $ref: "./agent/spec.yml" - description: Folder containing Kibana assets used by the package type: folder name: kibana required: false $ref: "./kibana/spec.yml" - description: Folder containing development resources type: folder name: _dev required: false visibility: private $ref: "./_dev/spec.yml" - description: Folder containing Elasticsearch assets used by the package type: folder name: elasticsearch required: false $ref: "./elasticsearch/spec.yml" - description: Configuration file to process the results returned from the package validation. This file is just for package validation and it should be ignored when installing or using the package. type: file contentMediaType: "application/x-yaml" name: "validation.yml" required: false $ref: "./validation.spec.yml"