正在加载

包规范

集成是一种包类型,因此必须遵守 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"
  - description: Folder containing images for the package
    type: folder
    name: img
    required: false
    $ref: "./img/spec.yml"

versions:
  - before: 3.2.2
    patch:
      - op: remove
        path: "/contents/11"
  1. img 文件夹的定义。
© . All rights reserved.