加载中

定义部署模式

部署模式允许您选择集成安装和管理的方式。

  • 默认模式:您自行安装和管理 Elastic Agent(例如使用 Fleet)。
  • 无代理模式:Elastic Stack 为您管理代理,无需自行安装任何内容。

一些集成可以支持两种模式,而另一些可能仅支持其中一种。

当您为集成创建策略模板时,可以使用 deployment_modes 属性来指定它支持哪些模式。

示例

format_version: 3.2.0
name: aws
title: AWS
version: 2.13.1
...
policy_templates:
  - name: billing
    title: AWS Billing
    description: Collect billing metrics with Elastic Agent
    deployment_modes:
      default:
        enabled: false
      agentless:
        enabled: true
    data_streams:
      - billing
    ...
		
  1. 定义支持的部署模式
  2. 禁用代理部署支持
  3. 启用无代理部署支持

在此处,“billing”模板仅启用了无代理模式。

有时,您希望某些配置选项仅在特定模式下显示。为此,请使用 hide_in_deployment_modes 属性。

示例

streams:
  - input: filestream
    vars:
      - name: paths
        type: text
        title: Paths
        multi: true
        required: true
        show_user: true
        default:
          - /var/log/my-package/*.log
      - name: agentless_only
        type: text
        title: Agentless only variable
        multi: false
        required: false
        show_user: true
        hide_in_deployment_modes:
          - default
     - name: hidden_in_agentless
       type: text
       title: Hidden in agentless variable
       multi: false
       required: false
       show_user: true
       hide_in_deployment_modes:
         - agentless
		
  1. 在默认部署模式下禁用该变量的可见性
  2. 在无代理部署模式下禁用该变量的可见性

这有助于保持 UI 的整洁,并使其与每种部署类型相关。有关变量属性定义的更多信息,请参阅 定义变量属性 (Define variable properties)

无代理部署受能力文件 (capabilities.yml) 保护。该文件列出了在无代理模式下允许或禁止的输入和功能,确保仅运行安全且受支持的功能。

您可以在 capabilities.yml 中查看当前允许的功能。

© . This website operates independently and is not affiliated with or endorsed by Elasticsearch B.V. All brand names, logos, and trademarks are the property of their respective owners.