问题描述
我有一个可以完全在docker(docker-compose)上运行的ELK堆栈
我还安装了SearchGuard,这是负责身份验证和角色/用户管理的ElasticSearch插件,我还安装了Elastalert,又是用于通过邮件等在某些情况下发出警报的Elasticsearch插件。
我的问题是Elastalert无法连接到ElasticSearch,它会抛出
curl: (22) The requested URL returned error: 401
Waiting for ES,trying again in 5 seconds\n
我在SearchGuard上有演示users/roles,我的Elastalert configuration.yaml如下:
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
我尝试按照建议的here打开ssl / cert设置,但始终抛出相同的401错误
# Connect with TLS to elasticsearch
use_ssl: True
# Verify TLS certificates
verify_certs: True
感谢任何帮助,谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)