Using x-pack in elasticsearch.py


(Abolfazl Dalily) #1

i run this
Eleatic\elasticsearch-6.2.4\bin\x-pack>setup-passwords auto
command and I got this response :

Changed password for user kibana
PASSWORD kibana = ********************
Changed password for user logstash_system
PASSWORD logstash_system = **********************
Changed password for user elastic
PASSWORD elastic = ************************

now
how to use elastic username and password in
from elasticsearch import Elasticsearch
es = Elasticsearch(
[{'host':'localhost', 'port':9200}]
)

Thanks


(Tim Vernum) #2

See the authentication section in the elasticsearch-py docs:


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.