salt.returners.elasticsearch_return

Return data to an elasticsearch server for indexing.

maintainer:Jurnell Cockhren <jurnell.cockhren@sophicware.com>
maturity:New
depends:elasticsearch-py, jsonpickle
platform:all

To enable this returner the elasticsearch python client must be installed on the desired minions (all or some subset).

The required configuration is as follows:

elasticsearch:
  host: 'somehost.example.com:9200'
  index: 'salt'
  number_of_shards: 1 (optional)
  number_of_replicas: 0 (optional)

or to specify multiple elasticsearch hosts for resiliency:

elasticsearch:
  host:
    - 'somehost.example.com:9200'
    - 'anotherhost.example.com:9200'
    - 'yetanotherhost.example.com:9200'
  index: 'salt'
  number_of_shards: 1 (optional)
  number_of_replicas: 0 (optional)

The above configuration can be placed in a targeted pillar, minion or master configurations.

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
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