安装searchguard后elastalert无法连接到es

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

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

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

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

  1. es_host: elasticsearch
  2. # The elasticsearch port
  3. es_port: 9200
  4. es_username: admin
  5. es_password: admin
  6. # This is the folder that contains the rule yaml files
  7. # Any .yaml file will be loaded as a rule
  8. rules_folder: rules
  9. # How often ElastAlert will query elasticsearch
  10. # The unit can be anything from weeks to seconds
  11. run_every:
  12. seconds: 30
  13. # ElastAlert will buffer results from the most recent
  14. # period of time, in case some log sources are not in real time
  15. buffer_time:
  16. minutes: 1
  17. # Optional URL prefix for elasticsearch
  18. # es_url_prefix: elasticsearch
  19. # Connect with TLS to elasticsearch
  20. # use_ssl: True
  21. # Verify TLS certificates
  22. # verify_certs: True
  23. # GET request with body is the default option for Elasticsearch.
  24. # If it fails for some reason, you can pass 'GET', 'POST' or 'source'.
  25. # See http://elasticsearch-py.readthedocs.io/en/master/connection.html?highlight=send_get_body_as#transport
  26. # The index on es_host which is used for metadata storage
  27. # This can be a unmapped index, but it is recommended that you run
  28. # elastalert-create-index to set a mapping
  29. writeback_index: elastalert_status
  30. # If an alert fails for some reason, ElastAlert will retry
  31. # sending the alert until this time period has elapsed
  32. alert_time_limit:
  33. days: 2

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

  1. # Connect with TLS to elasticsearch
  2. use_ssl: True
  3. # Verify TLS certificates
  4. verify_certs: True

谢谢你的帮助,谢谢

暂无答案!

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

相关问题