Persons injector for Elasticsearch demo purpose
3.9K
This injector is used to demo elasticsearch and Kibana.
# Pull the latest build
docker pull dadoonet/persons-injector
# Or a specific version
docker pull dadoonet/persons-injector:9.3.1
# Launch it (with all default settings)
docker run dadoonet/persons-injector
With no option, it will inject 1000000 documents with a bulk size of 10000 in a local cluster running at
https://127.0.0.1:9200 with default password changeme for user named elastic.
Injector comes with the following implementations:
--elasticsearch flag), where you want to index generated data to an elasticsearch cluster running locally or on cloud.--console flag), where you want to just print on the console generated data.For both, you can configure --nb option to define the number of documents you'd like to generate
(defaults to 1000000).
Also --bulk option can be set to define how many documents should be sent at once (defaults to 10000).
For example:
docker run dadoonet/persons-injector --nb 1000 --bulk 100
If no implementation is set, the injector will assume by default that you want to index your data in Elasticsearch
and will set --elasticsearch flag for you.
When running an Elasticsearch instance, local or on cloud.elastic.co, you can define other options.
To define the host to send the data to, set --es.host option (defaults to https://127.0.0.1:9200):
docker run dadoonet/persons-injector --elasticsearch --es.host https://cloud_id.europe-west1.gcp.cloud.es.io
When using the default local cluster using the Docker image, you need to tell the injector to use the host network with
--network host option so that it can connect to the local Elasticsearch instance running on localhost:9200.
docker run --network host dadoonet/persons-injector --elasticsearch
If your cluster is secured, which is what will happen most likely on cloud.elastic.co, use --es.apikey to set the API Key to use.
docker run --network host dadoonet/persons-injector --elasticsearch --es.apikey API_KEY
If you'd like to index your data in another index than person (default one), use --es.index:
docker run --network host dadoonet/persons-injector --elasticsearch --es.index person
Note: --es.user (defaults to elastic) and --es.pass are deprecated and should not be used anymore.
If you want to use Kibana to display the information that have been generated, you can import the following
files into Kibana using Stack Management -> Kibana -> Saved Objects menu and click on "Import":
Example of the Persons dataset dashboard:

Example of the Canvas presentation:

When printing documents to the console, you can choose to prettify the documents first by using cs.pretty option:
docker run dadoonet/persons-injector --console --cs.pretty
You can start the injector like this (all options together):
docker run dadoonet/persons-injector \
--nb 1000 --bulk 100 \
--elasticsearch --es.host https://cloud_id.europe-west1.gcp.cloud.es.io:9243 --es.apikey API_KEY --es.index person \
--console --cs.pretty
When you build the project with maven, you'll see in target/scripts dir an example
of scripts which you can adapt to your needs.
You can use --silent, --debug or --trace to change the log level when using the injector.
That can give you more information when something is failing for example.
Content type
Image
Digest
sha256:ed6309867…
Size
24.6 MB
Last updated
10 days ago
docker pull dadoonet/persons-injector