State module to manage Elasticsearch.
New in version 2017.7.0.
salt.states.elasticsearch.
alias_absent
(name, index)¶Ensure that the index alias is absent.
salt.states.elasticsearch.
alias_present
(name, index, definition=None)¶Ensure that the named index alias is present.
Example:
mytestalias:
elasticsearch.alias_present:
- index: testindex
- definition:
filter:
term:
user: kimchy
salt.states.elasticsearch.
index_absent
(name)¶Ensure that the named index is absent.
salt.states.elasticsearch.
index_present
(name, definition=None)¶Ensure that the named index is present.
Example:
# Default settings
mytestindex:
elasticsearch_index.present
# Extra settings
mytestindex2:
elasticsearch_index.present:
- definition:
settings:
index:
number_of_shards: 10
salt.states.elasticsearch.
index_template_absent
(name)¶Ensure that the named index template is absent.
salt.states.elasticsearch.
index_template_present
(name, definition)¶Ensure that the named index templat eis present.
Example:
mytestindex2_template:
elasticsearch_index_template.present:
- definition:
template: logstash-*
order: 1
settings:
number_of_shards: 1
salt.states.elasticsearch.
pipeline_absent
(name)¶Ensure that the named pipeline is absent
salt.states.elasticsearch.
pipeline_present
(name, definition)¶Ensure that the named pipeline is present.
Example:
test_pipeline:
elasticsearch_pipeline.present:
- definition:
description: example pipeline
processors:
- set:
field: collector_timestamp_millis
value: '{{ '{{' }}_ingest.timestamp{{ '}}' }}'
salt.states.elasticsearch.
search_template_absent
(name)¶Ensure that the search template is absent
salt.states.elasticsearch.
search_template_present
(name, definition)¶Ensure that the named search template is present.
Example:
test_pipeline:
elasticsearch.search_template_present:
- definition:
inline:
size: 10