The elastic-package
tool can be used to bootstrap a new package or add a data stream using an embedded archetype (resource templates).
It's advised to use elastic-package create
to build new package rather than copying sources of an existing package.
This will ensure that you're following latest recommendations for the package format.
Pick the directory where you'd like to create a new package. For integrations, it's: packages/.
- Bootstrap new package using the TUI wizard:
elastic-package create package
. - Adjust the created package manually:
- define policy templates and inputs
- add icons and screenshots
- update README files
- update
changelog.yml
file
- Verify the package:
- Enter the package directory:
cd <new_package>
. - Check package correctness:
elastic-package check
.
- Enter the package directory:
Enter the package directory. For nginx integration, it's: packages/nginx/.
- Bootstrap new data stream using the TUI wizard:
elastic-package create data-stream
. - Adjust the created data stream manually:
- define streams and required vars
- define used fields
- define ingest pipeline definition (if necessary)
- update the agent's stream configuration
- Verify the package:
- Enter the package directory:
cd <new_package>
. - Check package correctness:
elastic-package check
.
- Enter the package directory:
Once the package assets are defined, these should be exported using the elastic-package export
command. As dashboards are the only type of exportable asset, the command is:
elastic-package export dashboards
Used this way, this command will open an interactive prompt for dashboard selection. Alternatively, a comma-separated list of dashboard ids can be provided with the -d
flag:
elastic-package export dashboards -d 123,345,789
When updating an existing package, assets may need to be updated, e.g. to make use of recently added features. Dashboards can be made editable by using the elastic-package edit dashboards
command.