安装searchguard后elastalert无法连接到es

owfi6suc  于 2021-06-15  发布在  ElasticSearch
关注(0)|答案(0)|浏览(324)

我有一个麋鹿堆栈运行在码头完全(码头组成)
我还安装了searchguard,它是负责身份验证和角色/用户管理的elasticsearch插件,我还安装了elastalert,它同样是负责通过邮件等在某些情况下发出警报的elasticsearch插件。
我的问题是elastalert无法连接到elasticsearch,它抛出

curl: (22) The requested URL returned error: 401
Waiting for ES, trying again in 5 seconds\n

我在searchguard上有演示用户/角色,我的elastalert配置如下:

es_host: elasticsearch

# The elasticsearch port

es_port: 9200

es_username: admin
es_password: admin

# This is the folder that contains the rule yaml files

# Any .yaml file will be loaded as a rule

rules_folder: rules

# How often ElastAlert will query elasticsearch

# The unit can be anything from weeks to seconds

run_every:
  seconds: 30

# ElastAlert will buffer results from the most recent

# period of time, in case some log sources are not in real time

buffer_time:
  minutes: 1

# Optional URL prefix for elasticsearch

# es_url_prefix: elasticsearch

# Connect with TLS to elasticsearch

# use_ssl: True

# Verify TLS certificates

# verify_certs: True

# GET request with body is the default option for Elasticsearch.

# If it fails for some reason, you can pass 'GET', 'POST' or 'source'.

# See http://elasticsearch-py.readthedocs.io/en/master/connection.html?highlight=send_get_body_as#transport

# The index on es_host which is used for metadata storage

# This can be a unmapped index, but it is recommended that you run

# elastalert-create-index to set a mapping

writeback_index: elastalert_status

# If an alert fails for some reason, ElastAlert will retry

# sending the alert until this time period has elapsed

alert_time_limit:
  days: 2

我尝试按这里的建议打开ssl/cert设置,但它总是抛出相同的401错误


# Connect with TLS to elasticsearch

use_ssl: True

# Verify TLS certificates

verify_certs: True

谢谢你的帮助,谢谢

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题