Return data to an elasticsearch server for indexing.
maintainer: | Jurnell Cockhren <jurnell.cockhren@sophicware.com>, Arnold Bechtoldt <mail@arnoldbechtoldt.com> |
---|---|
maturity: | New |
depends: | elasticsearch-py |
platform: | all |
To enable this returner the elasticsearch python client must be installed on the desired minions (all or some subset).
Please see documentation of elasticsearch execution module
for a valid connection configuration.
Warning
The index that you wish to store documents will be created by Elasticsearch automatically if doesn't exist yet. It is highly recommended to create predefined index templates with appropriate mapping(s) that will be used by Elasticsearch upon index creation. Otherwise you will have problems as described in #20826.
To use the returner per salt call:
salt '*' test.ping --return elasticsearch
In order to have the returner apply to all minions:
ext_job_cache: elasticsearch
NOTE: The following options are valid for 'state.apply', 'state.sls' and 'state.highstate' functions only.
elasticsearch:
hosts:
- "10.10.10.10:9200"
- "10.10.10.11:9200"
- "10.10.10.12:9200"
index_date: True
number_of_shards: 5
number_of_replicas: 1
debug_returner_payload: True
states_count: True
states_order_output: True
states_single_index: True
functions_blacklist:
- test.ping
- saltutil.find_job
salt.returners.elasticsearch_return.
event_return
(events)¶Return events to Elasticsearch
Requires that the event_return configuration be set in master config.
salt.returners.elasticsearch_return.
get_load
(jid)¶Return the load data that marks a specified jid
New in version 2015.8.1.
salt.returners.elasticsearch_return.
prep_jid
(nocache=False, passed_jid=None)¶Do any work necessary to prepare a JID, including sending a custom id
salt.returners.elasticsearch_return.
returner
(ret)¶Process the return from Salt
salt.returners.elasticsearch_return.
save_load
(jid, load, minions=None)¶Save the load to the specified jid id
New in version 2015.8.1.