0
I’m getting a Warning when trying to get all indexes in Elastic after the latest version update.
Warning.
C: Users... Appdata Local Programs Python Python38-32 lib site-Packages Elasticsearch Connection base.py:190: Elasticsearchdeprecationwarning: this request Accesses system indices: [. apm-agent-Configuration, . apm-custom-link, . kibana_1, . kibana_2, .kibana_task_manager_1, . kibana_task_manager_2, .kibana_task_manager_3], but in a Future major version, direct access to system indices will be prevented by default warnings.warn(message, Category=Elasticsearchdeprecationwarning)
Occurs when I do
for index in es.indices.get('*'):
Elasticsearch version 7.10
This question was also asked in stackoverflow.with
As per https://www.elastic.co/guide/elasticsearch/reference/current/release-highlights.html#deprecate-Rest-api-access-to-system-indices and the error message itself (which is actually a Warning and not an error), REST API access to indexes is being discontinued (obsolete). Most of the REST API requests that attempt to access the system indexes will return this message, in your case it is this (probably)
GET _cat/[indices,...]
(or one of the other routes)– Guilherme Nascimento
I do not understand Elastic, but I believe that now the way should be here https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html
– Guilherme Nascimento
@Guilhermenascimento had even seen this, but the documentation does not give a basic example of how to get around it.
– Marco Souza
It is not "circumvent", have to change everything :( ... from what I understood (if I understood) only having the indices to access now, but really do not understand it to affirm how to obtain previously.
– Guilherme Nascimento
You are using the library
elasticsearch
to access Elastic. If there have been changes to the Elastic API, the library has probably been upgraded as well (or it does not support the newer version). Try to update it.– Woss
Hello @Woss, this is described on first comment and has the link that points out which api urls have been discontinued and the explanation as to what the indices will have to be. What he wants is to know how to do it.
– Guilherme Nascimento
No, I was referring to the Python library itself: https://elasticsearch-py.readthedocs.io/en/7.10.0/index.html
– Woss
@Woss, the library has been updated to last version (Elasticsearch/Reference/7.10), but as I understood it no longer has how to use (*) to return all the indeces of the API, it would have to send all the names of indeces separated by (;)but I don’t always have everyone’s name because they are created dynamically.
– Marco Souza