To use the Elasticsearch sink add the following flag:
--sink=elasticsearch:<ES_SERVER_URL>[?<OPTIONS>]
Normally an Elasticsearch cluster has multiple nodes or a proxy, so these need
to be configured for the Elasticsearch sink. To do this, you can set
ES_SERVER_URL
to a dummy value, and use the ?nodes=
query value for each
additional node in the cluster. For example:
--sink=elasticsearch:?nodes=http://foo.com:9200&nodes=http://bar.com:9200
(*) Notice that using the ?nodes
notation will override the ES_SERVER_URL
If you run your ElasticSearch cluster behind a loadbalancer (or otherwise do not want to specify multiple nodes) then you can do the following:
(*) Be sure to add your version tag in your sink;
--sink=elasticsearch:http://elasticsearch.example.com:9200?sniff=false&ver=6
Besides this, the following options can be set in query string:
(*) Note that the keys are case sensitive
index
- the index for metrics and events. The default isheapster
, you can define index with uri param: index=xxxesUserName
- the username if authentication is enabledesUserSecret
- the password if authentication is enabledmaxRetries
- the number of retries that the Elastic client will perform for a single request after before giving up and return an error. It is0
by default, so retry is disabled by default.healthCheck
- specifies if healthCheck are enabled by default. It is enabled by default. To disable, provide a negative boolean value like0
orfalse
.sniff
- specifies if the sniffer is enabled by default. It is enabled by default. To disable, provide a negative boolean value like0
orfalse
.startupHealthcheckTimeout
- the time in seconds the healthCheck waits for a response from Elasticsearch on startup, i.e. when creating a client. The default value is1
.ver
- ElasticSearch cluster version, can be either2
,5
,6
or7
. The default is5
bulkWorkers
- number of workers for bulk processing. Default value is5
.cluster_name
- cluster name for different Kubernetes clusters. Default value isdefault
.pipeline
- (optional; >ES5) Ingest Pipeline to process the documents. The default is disabled(empty value)