From 246aa141e5c55a4834e69eb5f185f10a30844341 Mon Sep 17 00:00:00 2001 From: buratinopy <82382252+buratinopy@users.noreply.github.com> Date: Fri, 22 Oct 2021 18:22:09 +0300 Subject: [PATCH] Update __init__.py Added "hosts" parameter --- elastalert/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elastalert/__init__.py b/elastalert/__init__.py index 40d4397f..f5cd68d3 100644 --- a/elastalert/__init__.py +++ b/elastalert/__init__.py @@ -16,7 +16,8 @@ def __init__(self, conf): """ :arg conf: es_conn_config dictionary. Ref. :func:`~util.build_es_conn_config` """ - super(ElasticSearchClient, self).__init__(host=conf['es_host'], + super(ElasticSearchClient, self).__init__(host=conf.get('es_host', None), + hosts=conf.get('es_hosts', []), port=conf['es_port'], url_prefix=conf['es_url_prefix'], use_ssl=conf['use_ssl'],