-
Notifications
You must be signed in to change notification settings - Fork 124
[Benchmark/Stream] Add getting started docs for elastic-package stream command #1627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
51c778d
[Benchmark/Stream] Add getting started docs for elastic-package strea…
ruflin 71a20e2
Update docs/howto/sample_data.md
ruflin 9965e43
Update docs/howto/sample_data.md
ruflin 03ee319
add path example
ruflin fcfe009
Merge remote-tracking branch 'origin/sample-data-docs' into sample-da…
ruflin 7330728
add --no-base-path example
ruflin 1550989
Merge branch 'main' into sample-data-docs
ruflin b90a1a9
Merge branch 'main' into sample-data-docs
ruflin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Use elastic-package to generate sample data | ||
|
||
`elastic-package` with integrations can be used to generate sample data for integration packages. The following is a quick guide on how to use it with certain packages with your own stack deployment. | ||
|
||
## Getting started | ||
|
||
### Install elastic-package | ||
|
||
The first thing needed, is an installation of `elastic-package`, you can find [here](https://github.com/elastic/elastic-package/tree/main?tab=readme-ov-file#getting-started) different ways how to install it. | ||
|
||
### Setup Elastic Stack | ||
|
||
As soon as elastic-package is set up, you need a running Elastic. The simplest thing to set it up with Docker is running `elastic-package stack up --version=8.13.0-SNAPSHOT -v`. This will start a snapshot build of an Elastic Stack cluster on your machine and you can open Kibana under `https://localhost:5601`. | ||
|
||
If you have your own Cloud setup or run Kibana from source, you can set the environment variables accordingly. The following is a sample assuming you are running Kibana and Elasticsearch from source: | ||
|
||
``` | ||
ELASTIC_PACKAGE_ELASTICSEARCH_HOST=http://localhost:9200 | ||
ELASTIC_PACKAGE_ELASTICSEARCH_USERNAME=elastic | ||
ELASTIC_PACKAGE_ELASTICSEARCH_PASSWORD=changeme | ||
ELASTIC_PACKAGE_KIBANA_HOST=http://localhost:5601 | ||
#ELASTIC_PACKAGE_CA_CERT | ||
``` | ||
|
||
The same can be use to connect to your Elastic Cloud cluster. Unfortunately elastic-package currently does not support an API key to be used. | ||
|
||
If you are running Kibana from source and have a base path like `ciy`, use the following HOST for Kibana: | ||
|
||
``` | ||
ELASTIC_PACKAGE_KIBANA_HOST=http://localhost:5601/ciy | ||
``` | ||
|
||
### Checkout integrations repository | ||
|
||
To ingest data for an integration, currently you have to checkout the integrations repo to your machine as the templates for the data are not part of the packages itself. Clone the integrations repo to your disk: | ||
|
||
``` | ||
git clone https://github.com/elastic/integrations.git | ||
``` | ||
|
||
### Ingest data | ||
|
||
Now jump to one of the packages which have a template file. We will be using nginx for this example but k8s and aws package also have templates inside. You need to `cd` into the nginx package: | ||
|
||
``` | ||
cd packages/nginx | ||
``` | ||
|
||
Inside the directory, run the following command with the `elastic-package` stack setup. | ||
|
||
``` | ||
elastic-package benchmark stream -v | ||
``` | ||
|
||
When running Kibana from source with `--no-base-path`, you can run the following command: | ||
|
||
``` | ||
ELASTIC_PACKAGE_ELASTICSEARCH_HOST=http://localhost:9200 ELASTIC_PACKAGE_ELASTICSEARCH_USERNAME=elastic ELASTIC_PACKAGE_ELASTICSEARCH_PASSWORD=changeme ELASTIC_PACKAGE_KIBANA_HOST=http://localhost:5601 elastic-package benchmark stream -v | ||
``` | ||
|
||
|
||
The above command will backfill the last 15 minutes in your Elastic Stack with nginx metrics and logs and install the nginx integration. You can go to [https://localhost:5601/app/observability-log-explorer/](https://localhost:5601/app/observability-log-explorer/) and filter down on `Nginx -> Error Logs` to see the error logs that are ingested. | ||
|
||
|
||
|
||
## Links | ||
|
||
There is a lot more documentation around how to build your own templates for packages or adjust existing ones. These are linked below: | ||
|
||
* [Writing rally benchmarks for a package](https://github.com/elastic/elastic-package/blob/main/docs/howto/rally_benchmarking.md) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.