gpt4 book ai didi

elasticsearch - Logstash Elastic Cloud 401未经授权的错误

转载 作者:行者123 更新时间:2023-12-02 23:18:32 25 4
gpt4 key购买 nike

Official logstash elastic cloud module

Official doc for starting with

我的logstash.yml看起来像:

  cloud.id: "Test:testkey"
cloud.auth: "elastic:password"

""内,前面有2个空格,结尾没有空格

这就是我在 logstash.yml中所拥有的一切,仅此而已,
我得到:
[2018-08-29T12:33:52,112][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"https://myserverurl:12345/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError, :error=>"Got response code '401' contacting Elasticsearch at URL 'https://myserverurl:12345/'"} my_config_file_name.conf看起来像:
input{jdbc{...jdbc here... This works, as I see data in windows console}}
output {
stdout { codec => json_lines }
elasticsearch {
hosts => ["myserverurl:12345"]
index => "my_index"
# document_id => "%{brand}"
}

我正在做的是在Windows bin/logstash上点击 cmd
它从我在conf文件输入中配置的数据库中加载数据,然后显示错误,我想将我的数据从 MySQL索引到Cloud上的 elasticsearch,我花了14天的试用期并创建了一个测试索引,以供以后学习之用必须部署它。
我的管道看起来像:
  - pipeline.id: my_id
path.config: "./config/conf_file_name.conf"
pipeline.workers: 1

如果日志中不包含敏感数据,我也可以提供。

基本上我不会将 MYSQL数据与云上的 ElasticSearch同步(计划检查),即 AWS

最佳答案

输出应为:

elasticsearch {
hosts => ["https://yourhost:yourport/"]
user => "elastic"
password => "password"
# protocol => https
# port => "yourport"
index => "test_index"
# document_id => "%{table_id}"
#-表示评论
如: Configuring logstash with elastic cloud docs

部署应用程序时提供的文档不提供jdbc的配置,即使在设置文件(即 logstash.yml)中定义,jdbc也需要用户名和密码

关于elasticsearch - Logstash Elastic Cloud 401未经授权的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52071984/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com