Loading

Upload an integration to Kibana

Fleet supports integration installation through direct upload as a means to support integration developers or users who have created custom integrations that they don’t want to commit upstream back to the Elastic Integrations repository.

Direct upload can also be useful in air-gapped environments, by providing a way to update integrations without needing to update a self-hosted package registry.

If you’ve followed the local development steps in Build an integration, upload your integration to Kibana with the following command:

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

For more information, see elastic-package install.

For development and testing on a remote Elastic instance, either an Elastic Cloud or on-prem deployment, you can use the elastic-package tool with environment variables set to specify the remote instance. This allows you to install, test and release your custom integration directly to your Elastic Cloud or on-prem instance.

First create an API key or username/password in Kibana on the remote instance, then use those credentials with elastic-package install to upload and install the package.

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
		

For more details, see elastic-package install, Elastic Cloud documentation, and elastic-package documentation.

To upload your integration to a production deployment, first zip the package:

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

You can now use the Kibana API to upload your integration:

$ 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
		

More information on this endpoint is available in the Fleet API Reference.