加载中

上传集成到 Kibana

Fleet 支持通过直接上传的方式安装集成,旨在为集成开发人员或用户提供便利,让他们可以处理那些不想提交到上游 Elastic Integrations 仓库 的自定义集成。

在离线(air-gapped)环境中,直接上传也非常有用,它提供了一种更新集成的方法,而无需更新自托管的包注册表。

如果您已遵循 构建集成 中的本地开发步骤,请使用以下命令将您的集成上传到 Kibana

elastic-package install --zip /path/to/my/custom-integration
		

更多信息,请参阅 elastic-package install

对于远程 Elastic 实例(无论是 Elastic Cloud 还是本地部署)的开发和测试,您可以使用设置了环境变量的 elastic-package 工具来指定远程实例。这允许您直接将自定义集成安装、测试和发布到您的 Elastic Cloud 或本地实例。

首先在远程实例的 Kibana 中创建 API 密钥或用户名/密码,然后将这些凭据与 elastic-package install 一起使用以上传并安装该包。

cd /path/to/my/custom/integration
export ELASTIC_PACKAGE_KIBANA_HOST=https://your.kibana.host

// Export either API_KEY or USERNAME/PASSWORD
export ELASTIC_PACKAGE_ELASTICSEARCH_API_KEY=<elastic_api_key>
export ELASTIC_PACKAGE_ELASTICSEARCH_USERNAME=<elastic_username>
export ELASTIC_PACKAGE_ELASTICSEARCH_PASSWORD=<elastic_password>
elastic-package install
		

更多详情,请参阅 elastic-package installElastic Cloud 文档 以及 elastic-package 文档

要将集成上传到生产部署环境,请先压缩该包

$ cd /path/to/my/custom-integration
$ elastic-package build
		

现在,您可以使用 Kibana API 上传您的集成

$ curl -XPOST \
  -H 'content-type: application/zip' \
  -H 'kbn-xsrf: true' \
  https://your.kibana.host/api/fleet/epm/packages \
  -u {username}:{password} \
  --data-binary @my-custom-integration.zip
		

有关此端点的更多信息,请参阅 Fleet API 参考

© . 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.