Module Expr Str ImportFrom alias ImportFrom alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Import alias Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr AttributeLoad NameLoad attr Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad ImportFrom alias FunctionDef arguments args defaults body Expr Str If UnaryOpNot NameLoad body Return TupleLoad NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Assign NameStore ListLoad Str If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr body Raise Call NameLoad Call AttributeLoad Str attr NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad body Return NameLoad orelse Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If UnaryOpNot Call NameLoad keyword NameLoad body Return NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad body Return NameLoad orelse Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If Call NameLoad NameLoad body Return NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If UnaryOpNot Call NameLoad keyword NameLoad body Return NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad body Return NameLoad orelse Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If Call NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad Return Call NameLoad NameLoad NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body If Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad body Return NameLoad orelse Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Return NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad Return NameLoad decorator_list
N/A N/A 
Elasticsearch - A distributed RESTful search and analytics server

Module to provide Elasticsearch compatibility to Salt
(compatible with Elasticsearch version 1.5.2+)

.. versionadded:: 2015.8.0

:depends:       `elasticsearch-py <http://elasticsearch-py.readthedocs.org/en/latest/>`_

:configuration: This module accepts connection configuration details either as
    parameters or as configuration settings in /etc/salt/minion on the relevant
    minions:

    .. code-block:: yaml

        elasticsearch:
          host: '10.10.10.100:9200'

        elasticsearch:
          hosts:
            - '10.10.10.100:9200'
            - '10.10.10.101:9200'
            - '10.10.10.102:9200'

        elasticsearch:
          hosts:
            - '10.10.10.100:9200'
          number_of_shards: 1
          number_of_replicas: 0
          functions_blacklist:
            - 'saltutil.find_job'
            - 'pillar.items'
            - 'grains.items'


    This data can also be passed into pillar. Options passed into opts will
    overwrite options passed into pillar.
 __future__ absolute_import salt.exceptions CommandExecutionError N/A logging N/A log N/A N/A logging getLogger __name__ N/A N/A N/A elasticsearch N/A N/A N/A N/A N/A logging getLogger elasticsearch setLevel N/A logging CRITICAL N/A HAS_ELASTICSEARCH True N/A N/A N/A ImportError N/A N/A HAS_ELASTICSEARCH False salt.ext.six string_types __virtual__ N/A N/A N/A N/A N/A 
    Only load if elasticsearch libraries exist.
     N/A N/A HAS_ELASTICSEARCH N/A N/A N/A False Cannot load module elasticsearch: elasticsearch libraries not found N/A True N/A _get_instance N/A N/A hosts profile N/A None None N/A N/A 
    Return the elasticsearch instance
     N/A es None N/A N/A profile None N/A N/A profile elasticsearch N/A N/A isinstance profile string_types N/A N/A _profile N/A N/A __salt__ N/A config.option profile None N/A N/A N/A isinstance profile dict N/A N/A _profile profile N/A _profile N/A N/A hosts N/A N/A _profile get host None N/A N/A hosts N/A N/A hosts N/A N/A _profile get hosts None N/A N/A hosts N/A N/A hosts N/A 127.0.0.1:9200 N/A N/A isinstance hosts string_types N/A N/A hosts N/A hosts N/A N/A N/A es N/A N/A elasticsearch Elasticsearch hosts N/A N/A N/A N/A es ping N/A N/A N/A CommandExecutionError N/A N/A Could not connect to Elasticsearch host/ cluster {0}, is it unhealthy? format hosts N/A N/A N/A N/A N/A elasticsearch exceptions ConnectionError N/A N/A N/A CommandExecutionError N/A N/A Could not connect to Elasticsearch host/ cluster {0} format hosts N/A es N/A alias_create N/A N/A indices alias hosts body profile N/A None None None N/A N/A 
    Create an alias for a specific index/indices

    CLI example::

        salt myminion elasticsearch.alias_create testindex_v1 testindex
     N/A es N/A _get_instance hosts profile N/A N/A N/A result N/A N/A N/A es indices put_alias index indices name alias body body N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A alias_delete N/A N/A indices aliases hosts body profile N/A None None None N/A N/A 
    Delete an alias of an index

    CLI example::

        salt myminion elasticsearch.alias_delete testindex_v1 testindex
     N/A es N/A _get_instance hosts profile N/A N/A N/A result N/A N/A N/A es indices delete_alias index indices name aliases N/A N/A N/A result get acknowledged False N/A N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A alias_exists N/A N/A aliases indices hosts profile N/A None None None N/A N/A 
    Return a boolean indicating whether given alias exists

    CLI example::

        salt myminion elasticsearch.alias_exists testindex
     N/A es N/A _get_instance hosts profile N/A N/A N/A N/A N/A N/A es indices exists_alias name aliases index indices N/A N/A True N/A N/A False N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A N/A N/A N/A elasticsearch exceptions ConnectionError N/A N/A None N/A None N/A alias_get N/A N/A indices aliases hosts profile N/A None None None None N/A N/A 
    Check for the existence of an alias and if it exists, return it

    CLI example::

        salt myminion elasticsearch.alias_get testindex
     N/A es N/A _get_instance hosts profile N/A N/A N/A ret N/A N/A N/A es indices get_alias index indices name aliases N/A ret N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A document_create N/A N/A index doc_type body id hosts profile N/A None None None None N/A N/A 
    Create a document in a specified index

    CLI example::

        salt myminion elasticsearch.document_create testindex doctype1 '{}'
     N/A es N/A _get_instance hosts profile N/A N/A N/A result N/A N/A es index index index doc_type doc_type body body id id N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A document_delete N/A N/A index doc_type id hosts profile N/A None None N/A N/A 
    Delete a document from an index

    CLI example::

        salt myminion elasticsearch.document_delete testindex doctype1 AUx-384m0Bug_8U80wQZ
     N/A es N/A _get_instance hosts profile N/A N/A N/A N/A N/A index_exists index index N/A N/A True N/A N/A result N/A N/A es delete index index doc_type doc_type id id N/A N/A N/A result get found False N/A N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A document_exists N/A N/A index id doc_type hosts profile N/A _all None None N/A N/A 
    Return a boolean indicating whether given document exists

    CLI example::

        salt myminion elasticsearch.document_exists testindex AUx-384m0Bug_8U80wQZ
     N/A es N/A _get_instance hosts profile N/A N/A N/A N/A N/A es exists index index id id doc_type doc_type N/A N/A True N/A N/A False N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A N/A N/A N/A elasticsearch exceptions ConnectionError N/A N/A None N/A None N/A document_get N/A N/A index id doc_type hosts profile N/A _all None None N/A N/A 
    Check for the existence of a document and if it exists, return it

    CLI example::

        salt myminion elasticsearch.document_get testindex AUx-384m0Bug_8U80wQZ
     N/A es N/A _get_instance hosts profile N/A N/A N/A ret N/A N/A es get index index id id doc_type doc_type N/A ret N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A index_create N/A N/A index body hosts profile N/A None None None N/A N/A 
    Create an index

    CLI example::

        salt myminion elasticsearch.index_create testindex
     N/A es N/A _get_instance hosts profile N/A N/A N/A N/A index_exists index N/A N/A True N/A N/A result N/A N/A N/A es indices create index index body body N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A index_delete N/A N/A index hosts profile N/A None None N/A N/A 
    Delete an index

    CLI example::

        salt myminion elasticsearch.index_delete testindex
     N/A es N/A _get_instance hosts profile N/A N/A N/A N/A N/A index_exists index index N/A N/A True N/A N/A result N/A N/A N/A es indices delete index index N/A N/A N/A result get acknowledged False N/A N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A index_exists N/A N/A index hosts profile N/A None None N/A N/A 
    Return a boolean indicating whether given index exists

    CLI example::

        salt myminion elasticsearch.index_exists testindex
     N/A es N/A _get_instance hosts profile N/A N/A N/A N/A N/A isinstance index list N/A N/A index N/A index N/A N/A N/A N/A es indices exists index index N/A N/A True N/A N/A False N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A N/A N/A N/A elasticsearch exceptions ConnectionError N/A N/A None N/A None N/A index_get N/A N/A index hosts profile N/A None None N/A N/A 
    Check for the existence of an index and if it exists, return it

    CLI example::

        salt myminion elasticsearch.index_get testindex
     N/A es N/A _get_instance hosts profile N/A N/A N/A N/A index_exists index N/A N/A ret N/A N/A N/A es indices get index index N/A ret N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A mapping_create N/A N/A index doc_type body hosts profile N/A None None N/A N/A 
    Create a mapping in a given index

    CLI example::

        salt myminion elasticsearch.mapping_create testindex user '{ "user" : { "properties" : { "message" : {"type" : "string", "store" : true } } } }'
     N/A es N/A _get_instance hosts profile N/A N/A N/A result N/A N/A N/A es indices put_mapping index index doc_type doc_type body body N/A N/A mapping_get index doc_type N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A mapping_delete N/A N/A index doc_type hosts profile N/A None None N/A N/A 
    Delete a mapping (type) along with its data

    CLI example::

        salt myminion elasticsearch.mapping_delete testindex user
     N/A es N/A _get_instance hosts profile N/A N/A N/A result N/A N/A N/A es indices delete_mapping index index doc_type doc_type N/A N/A N/A result get acknowledged False N/A N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A mapping_get N/A N/A index doc_type hosts profile N/A None None N/A N/A 
    Retrieve mapping definition of index or index/type

    CLI example::

        salt myminion elasticsearch.mapping_get testindex user
     N/A es N/A _get_instance hosts profile N/A N/A N/A ret N/A N/A N/A es indices get_mapping index index doc_type doc_type N/A ret N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A index_template_create N/A N/A name body hosts profile N/A None None N/A N/A 
    Create an index template

    CLI example::

        salt myminion elasticsearch.index_template_create testindex_templ '{ "template": "logstash-*", "order": 1, "settings": { "number_of_shards": 1 } }'
     N/A es N/A _get_instance hosts profile N/A N/A N/A result N/A N/A N/A es indices put_template name name body body N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A index_template_delete N/A N/A name hosts profile N/A None None N/A N/A 
    Delete an index template (type) along with its data

    CLI example::

        salt myminion elasticsearch.index_template_delete testindex_templ user
     N/A es N/A _get_instance hosts profile N/A N/A N/A result N/A N/A N/A es indices delete_template name name N/A N/A N/A result get acknowledged False N/A N/A True N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A index_template_exists N/A N/A name hosts profile N/A None None N/A N/A 
    Return a boolean indicating whether given index template exists

    CLI example::

        salt myminion elasticsearch.index_template_exists testindex_templ
     N/A es N/A _get_instance hosts profile N/A N/A N/A N/A N/A N/A es indices exists_template name name N/A N/A True N/A N/A False N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A index_template_get N/A N/A name hosts profile N/A None None N/A N/A 
    Retrieve template definition of index or index/type

    CLI example::

        salt myminion elasticsearch.index_template_get testindex_templ user
     N/A es N/A _get_instance hosts profile N/A N/A N/A ret N/A N/A N/A es indices get_template name name N/A ret N/A N/A N/A N/A N/A elasticsearch exceptions NotFoundError N/A N/A None N/A None N/A