Return data to an elasticsearch server for indexing.
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.
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:
Output the payload being posted to the log file in debug mode
Document type to use for normal return messages
Optional list of functions that should not be returned to elasticsearch
Use a dated index (e.g. <index>-2016.11.29)
Index to use when returning master events
Document type to use got master events
Index to use for master job cache
Document type to use for master job cache
Number of shards to use for the indexes
Number of replicas to use for the indexes
NOTE: The following options are valid for 'state.apply', 'state.sls' and 'state.highstate' functions only.
Count the number of states which succeeded or failed and return it in top-level item called 'counts'. States reporting None (i.e. changes would be made but it ran in test mode) are counted as successes.
Prefix the state UID (e.g. file_|-yum_configured_|-/etc/yum.conf_|-managed) with a zero-padded version of the '__run_num__' value to allow for easier sorting. Also store the state function (i.e. file.managed) into a new key '_func'. Change the index to be '<index>-ordered' (e.g. salt-state_apply-ordered).
Store results for state.apply, state.sls and state.highstate in the salt-state_apply index (or -ordered/-<date>) indexes if enabled
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
Return events to Elasticsearch
Requires that the event_return configuration be set in master config.
Return the load data that marks a specified jid
New in version 2015.8.1.
Do any work necessary to prepare a JID, including sending a custom id
Process the return from Salt
Save the load to the specified jid id
New in version 2015.8.1.