728x90
import ssl
import requests
from elasticsearch import Elasticsearch
#context=ssl.create_default_context(cafile="/home/elastic/elastic-7.8.0/elasticsearch-7.8.0/config/cert/ca/ca.crt")
#context.check_hostname = False
#context.verify_mode = ssl.CERT_NONE
# es = Elasticsearch( ["192.168.4."],
# scheme="https",
# port=9200,
# http_auth=('id', 'pw'),
# ssl_context=context
# )
댓글